Every error has the same shape, with a code you can rely on:
Build your handling around code. title and detail are written for people and may change. New codes may be added over time, so handle a code you don’t recognize by its HTTP status.

Error codes

When to retry

  • Safe to retry as is: 409 not_ready, 409 destination_not_ready, 429, 500, and 503. Use the same Idempotency-Key if the request has one.
  • If you didn’t get an answer: a timeout or dropped connection doesn’t mean the request failed. Retry with the same Idempotency-Key until you get a response, rather than starting over. See Idempotency.
  • Fix first: every other 4xx error, including 409 condition_reused and 409 quote_expired, means the request has to change before you send it again.
When you report a problem, include the response’s x-request-id.