Errors
API errors include an HTTP-aligned code, stable machine-readable error, human message, optional param, doc_url, and request_id.
Key points
- Branch on error or type, never on message text. Record request_id to trace a failed call.
- Fix authentication, permissions, invalid requests, and idempotency conflicts before retrying.
- Use backoff for rate limits and retry transient connection or server errors with an idempotency key.