Handler function invoked when a request is not authenticated in a Pages Router API route.
The incoming Next.js API request.
The Next.js API response object used to send the custom response.
The handler should send a response using res (for example, res.status(...).json(...)). Returning a value does not automatically end the request.
res
res.status(...).json(...)
Handler function invoked when a request is not authenticated in a Pages Router API route.