verifyAgentToken, verifyAgentAccount, or createAgentAccount returns { ok: false, code, error }.
codeis a frozen string union for branching in your code and guiding agents.erroris a human-readable description. You can also import descriptions at runtime viaVERIFY_ERROR_DESCRIPTIONS:
HTTP status code mapping
All@agentonboard/sdk and agentonboard-sdk framework bindings apply this status mapping automatically. Use the same mapping when calling core functions directly:
By default, framework bindings return
{ "code": "...", "error": "..." } in the JSON body so agents can read code and follow your auth.md. Pass an onFailure callback to customize responses (see Framework Overview).
Token verification codes (VerifyErrorCode)
These 9 codes can be returned by verifyAgentToken and every function built on top of it:
Account resolution codes (AccountErrorCode)
verifyAgentAccount and createAgentAccount return VerifyErrorCode plus two account-layer codes:
Safe logging rules
Logresult.code and (on success) result.jti. Never log raw JWT strings or Authorization headers: