Distinguish a slow call from a failed one
A timeout means your client stopped waiting. It does not establish that the provider stopped processing. Record the deadline and elapsed time, and check whether a proxy or server route has a shorter deadline than the API client.
Give retries a limit
For a rate limit or a retryable server error, respect Retry-After where supported and stop after a fixed number of attempts. Add a random delay to backoff so concurrent callers do not all retry together. Do not retry missing credentials or an invalid body unchanged.
Know what the downloadable client does
Our lab client makes up to three attempts for selected HTTP failures. It supports numeric Retry-After within a ten-second wait budget; it does not parse an HTTP-date value. Network timeouts stop the run. Failed rows are written to failures.json and the process exits with an error.
Retry decisions separately from actions
A classification retry must not send a second refund or duplicate notification. Keep the decision result separate from the action, and use your application’s deduplication or idempotency mechanism when executing actions.
Request example
delay_ms = min(max_delay_ms, base_delay_ms * 2 ** attempt) # Add jitter; respect Retry-After; stop after the configured attempt limit.