When to Retry
Implement retry logic for the following situations:
- 429 Too Many Requests
- 5xx Server Errors (e.g., 500, 503)
Use exponential backoff with jitter to space retries safely and avoid system overload.
For 429 errors, respect the Retry-After header value:
Detect 429 response
Check if the HTTP status code equals 429.
Wait before retrying
Use the value from the Retry-After header to delay your retry.
Retry the request
Reattempt the same request after the delay.
Avoid tight retry loops — they may cause cascading failures or get your integration rate-limited further.