Skip to content

permission_denied ​

A permission check refused a caller the surface knows.

StatusTitletype
403Permission deniedhttps://substrat.net/errors/permission-denied

403 is also the status of forbidden, so switch on code, not on the status.

What it means ​

The caller is known, and ctx.check said no: no role or grant they hold carries the key the operation checks. permission names that key. When the check was made on one record rather than on the whole scope, entity names the record. A refusal that more permissions would not change is forbidden, the other 403.

When it is returned ​

  • The permission check an operation makes before anything else refused.
  • A per-entity check refused; entity is set.

What it carries ​

  • permission: The permission key the check refused.
  • entity: The record the refusal is about, as an entity reference ({ entityType, entityId }).

See the body for the members any problem may carry.

What to do ​

Do not retry. The same request is refused until the caller's access changes. Ask whoever administers the scope for a role that carries permission, or stop offering the action to this user.

In /openapi.json ​

Documented on every operation's failure responses.

Every error code