Skip to content
Docs

Requests and responses

HTTP status mapping

HTTP status follows error.code; use the code for application branching.

Overview

HTTP status is derived from error.code (or an explicit override). Prefer the machine code when writing client logic—the status is for HTTP tooling and observability.

Common mappings

FamilyHTTPExample codes
Auth401unauthorized, revoked_secret
Policy / plan403forbidden, blacklisted, plan_chain_denied, plan_feature_denied, chain_disabled
Client input400invalid_argument, unsupported_capability, prices_batch_limit
Not found / gone404 / 410not_found, gone
Credits402credits_exhausted
Conflict and state409conflict, needs_wallet_sync, plan_limit_*
Body too large413invalid_argument
Rate limit429rate_limit_exceeded
Not implemented501not_implemented
Unavailable503provider_unavailable, *_unavailable
Server500internal

Unknown or future codes default to HTTP 400 unless the thrower sets status explicitly. Full table: Error codes catalog.