Handler invoked when a request is denied because the authenticated user does not satisfy the required group restrictions in an App Router API route.
The incoming Next.js request.
The App Router context containing dynamic route parameters.
The authenticated user associated with the request.
Returns a Response (or NextResponse) or a Promise resolving to one.
Response
NextResponse
Handler invoked when a request is denied because the authenticated user does not satisfy the required group restrictions in an App Router API route.