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. - Retry only
upstream_errorandrate_limited. Everything else is either permanent or requires a request fix; retrying will not help. - 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.