Skip to content

Reason codes & error model

Every denial and admin error carries a stable machine reason and a safe, structured shape. This is what lets you build automation and diagnostics on top of the gateway without scraping prose.

Admin API errors return a consistent envelope (gateway.admin-error/v1) with fields such as:

  • reasonCode — the stable machine reason (e.g. invalid_auth_context).
  • retryable — whether retrying could succeed.
  • machineSafe — a safe, human‑readable summary.
  • redactionStatus — confirmation that no sensitive material is included.

Denials from policy evaluation carry the matched (or missing) rule and the policy version — never the request payload. Turn a reason code into a full diagnosis with Diagnose a denial.

FamilyExamples
Authinvalid_auth_context, token_expired, jwks_unavailable
Policyno_matching_allow, explicit_deny, surface_not_permitted
Credentialcredential_unavailable, credential_mode_not_allowed
Connectivityconnector_unavailable, host_not_allowlisted
Sessionsession_revoked, session_not_found

Type set in Geist, Source Serif 4, and Departure Mono.