Handler function invoked when an authenticated user is denied access in a Pages Router API route due to group authorization restrictions.
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 an authenticated user is denied access in a Pages Router API route due to group authorization restrictions.