Skip to main content
A failed call costs nothing. Keep the HTTP status, code and requestId of a failure. If your client timed out, check the original request before you retry because it may still finish. Every code and its fix is in Errors.

Start with the status

Retry

Retry a call only when retryable is true. If it is missing, retry only 429, 500, 502, 503 and 504.
  1. Wait retryAfterSeconds when it is present. Otherwise wait 0.5 seconds, then double the wait for each retry. Add random jitter so workers do not retry together.
  2. Stop after 3 retries, or when the wait is over 60 seconds. A freeLimit wait can be hours, so get a key instead.
  3. Log requestId on the last error.
The SDKs do this. They follow retryable, retry eligible network errors, and stop after maxRetries retries (2 by default) or a wait over 60 seconds. A write that may have run is retried only when it can be replayed safely. API errors carry code, retryable and the request ID.
Python: Stophy(max_retries=3), and catch StophyError with error.code and error.request_id.

Report a problem

If an answer is wrong or differs from these docs, send feedback with the X-Request-ID. For support, email support@stophy.dev with it. GET /v1/logs/{id} shows what a request cost.