Closed kevinfaveri closed 1 year ago
There is no res to return, it seems, as the second param next to req is a NextFetchEvent, that obviously does not have the capabilities for returning stuff as expected
You can return new Response()
See the Edge Runtime api here: https://nextjs.org/docs/api-reference/edge-runtime
I have created a vercel OG endpoint, and want to return a 401 error with a JSON message for the specific error. Anyway to do it?