Skip to main content
Every non-2xx response includes error.code — a stable identifier you can branch on. The error.message field is informational and may be reworded over time, so don’t pattern-match against it.

Common codes

How to handle errors

  1. Always capture the top-level request_id alongside the error. We need it to find your request in our logs.
  2. Retry only the codes documented as retryableRATE_LIMITED, DOWNSTREAM_UNAVAILABLE, INTERNAL, and network timeouts. Retrying REQUEST_INVALID will never succeed.
  3. Use exponential backoff with jitter for retries — start at 500ms, cap at 30s, give up after 5 attempts.
  4. On IDEMPOTENCY_KEY_CONFLICT, stop and investigate. It means two code paths in your system both think they own the same key. Retrying without a fix is dangerous.