I've been attempting to submit a response in Next.js, but I keep encountering this error on Vercel:
Error message: inside catch 1 TypeError: t.status is not a function
Here's the code snippet causing the issue:
export async function GET(req: NextRequest, res : NextApiResponse){
return res.status(200).send(3);
}
I have successfully sent responses as JSON using NextResponse, which works well. However, for my specific requirement, I need to send data in this manner.