Skip to guide

Developer documentation

Errors and failed checks

Handle transport errors separately from identity and mandate decisions. A failed check is never evidence that access is allowed.

HTTP status codes

Most public JSON errors use error.code and include apiVersion and notPermission. The agent key directory returns { keys } on success and { error: { code } } on failure, without that metadata. Agent-Token minting errors use a flat error string with apiVersion and notPermission. A 200 mandate answer can still refuse an act; inspect decision.

The reference page for each operation lists the statuses in its OpenAPI contract.

StatusMeaningWhat to do
400 / 422Invalid inputFix the request fields before retrying.
401 / 403Missing proof or insufficient authorityCheck the signing proof or control key scope.
404Unknown or unpublished resourceCheck the ID. Do not assume the resource exists.
409Conflict or ambiguous passportInspect error.code. Do not choose an identity yourself.
413 / 415Body too large or wrong content typeSend the documented JSON shape and size.
429Request limit reachedWait for Retry-After before retrying.
501Signing is not configuredThe issuer must configure signing before minting Agent-Tokens.
503Check unavailableRetry later. Do not treat the result as active or inside.

Verifier reason strings

verifyAgent and verifyAgentRequest return ok: false with a reason. Reasons depend on the helper. They are not HTTP status codes.

ReasonsWhat to do
untrusted_issuer / invalid_optionsFix your trusted issuer configuration. Never trust an issuer selected by a token.
unknown_keyRefuse the key. A directory HTTP 404 includes unknown or stopped agents; it is not an availability failure.
jwks_unreachable / directory_unavailableCheck issuer availability. Network errors and directory 5xx responses are unavailable; fail closed.
bad_signature / malformed / claimsRefuse the request. Check token and signature serialization.
wrong_type / unsupported_version / unsupported_algorithmUse the documented token or request-signature profile.
wrong_audienceMint a token for your exact receiving service.
expired / not_yet_valid / too_oldCheck clocks and obtain a fresh proof. Do not extend the acceptance window.
revokedRefuse the passport.
stale_revocations / revocation_unavailableObtain a signed list within your freshness limit. Do not accept stale data.
replayRefuse the repeated request. Check nonce reuse or store capacity.

Mandate decisions

inside means the owner's current clauses cover the signed act. It does not grant your service's permission. clause is a zero-based rule index. remaining reports what is left after the decision.

outside can include total, count, currency, per_act, mandate_changed, invalid_proof, unsigned_intent, replay, cannot_count, trial, clause, not_started, not_found or invalid_passport. A stale public hash can include narrowed_since. Fetch current clauses and obtain a fresh signature when the intent changes.

revoked, expired and stopped refuse the act. The helper returns refused when it rejects inputs or the Agent-Token before calling the live check: invalid_issuer, invalid_token, missing_mandate or invalid_request. Token validation may fetch JWKS first. unavailable means the live check could not complete, including key-fetch, network, timeout, response size or non-success HTTP errors. Handle all of these without performing the act.

Do not blindly retry a new committing proof after an uncertain response. A different signed request is a different act. Keep the original proof and reconcile its outcome.

Errors and failed checks · Developers · PassControl