Skip to main content
Version: 4.x

Forbidden

Type URIhttps://doc.expresso-ts.com/docs/errors/forbidden
HTTP status403

The caller is identified, and is not allowed to do what the request asks.

When it is sent​

  • A handler, guard or middleware throws AppError.forbidden(message?). The default message is Forbidden.
  • Any error that carries the status 403 and is meant for the client.
{
"type": "https://doc.expresso-ts.com/docs/errors/forbidden",
"title": "Forbidden",
"status": 403,
"detail": "Forbidden",
"instance": "/api/admin/users"
}

What to do​

The credentials are valid, so sending them again changes nothing. The caller needs a role or permission it does not have.

See Error responses for the shape of the document and how to turn it on.