code field — a machine-readable string that never changes once published. This page lists every code the API can return, along with the high-level type SDKs branch on and the HTTP status code each maps to.
For the shape of the error envelope itself (type, code, message, doc_url, request_id, etc.), see Error format.
Branching guidance
- Branch on
type, not status code alone. Status codes collapse distinct failure modes;typeseparatesconflictfromidempotency_conflicteven though both surface as409. - Treat
codeas the narrow key. Use it for telemetry, runbook lookups, and per-error UI copy. Never displaymessageto end users — it is developer-facing and may change. - Honor the envelope’s
retryablefield. Codes with an explicit retry contract emitretryableon every error response:falsemeans the same request can never succeed (fix the input or state first),truemeans transient — retry with backoff. Where the column below shows —, retryability is context-dependent; when in doubt, retry onlyupstream_errorandrate_limited. - Always log
request_id. It is the single field that lets Moda support trace a specific failure across logs and Sentry.
Catalog
Type reference
Thetype field is a closed set. SDKs may translate types to typed exceptions; new code values may be added to an existing type without notice, so always include a default branch.