Retries and error handling
Automatically retry network timeouts, HTTP 429, and HTTP 502, 503 or 504. For shipment creation retain the original Idempotency-Key and identical request body. Do not automatically retry HTTP 400, 401, 403, 409 or 422. Inspect the documented error code and correct the underlying input or permissions.
Use at most six attempts in total, including the initial request. If Retry-After is a valid nonnegative integer number of seconds, wait min(value, 30) seconds. This benchmark API defines only integer-seconds Retry-After, not HTTP-date values. Without a valid Retry-After, use exponential delays starting at 500 ms, capped at 8000 ms, with full jitter between zero and the current cap.
After six unsuccessful attempts, stop and surface the error for operator handling. HTTP 410 cursor_expired has its own pagination restart procedure; it is not handled by blindly retrying the same request. See Pagination and Idempotency.