code— a stable machine-readable string. Switch on this.message— a human-readable summary. Log it; don’t parse it.details— present on validation errors, one entry per failed field.
Status codes
Validation is strict and upfront
Every endpoint validates its body against a schema before any work happens — so a bad request never half-applies. A422 with details tells you exactly which field to fix. Required fields, types, enums, lengths, and cross-field rules (e.g. “percentage discount ≤ 100”) are all enforced at the edge.
Retrying safely
A500 or 429 is safe to retry if you send an Idempotency-Key — Duro will replay the original result rather than double-apply. Never blind-retry a mutation without one.