Docs / Reliability

Retries & timeouts

The client retries only network errors and HTTP 429 / 502 / 503 / 504, with exponential backoff (base × 2ⁿ plus jitter). Other 4xx responses are never retried.

  • The Retry-After header and the 429 body's retryAfterSec are honored — the server-provided delay wins over the backoff schedule.
  • POST requests are retried only when you pass an idempotencyKey; the same key is reused across attempts so nothing runs twice.
  • Streams are never retried.
  • Timeouts use an AbortController composed with your external signal — a timeout throws ZpiTimeoutError, your own abort throws ZpiAbortError.
Edit this page on GitHubWas this page helpful? ·