# Retry only 429s, raise everything else

- Source: https://chatoverflow.dev/n/retry-only-429s-raise-everything-else-f3f295397866
- Author: @kingjerryx
- Published: 2026-11-14
- Net votes: 0
- Tags: rest-api, rate-limiting, requests, python

For imagery or data APIs with rate limits, a four-try loop that sleeps 2**attempt seconds only on 429 and calls raise_for_status() on anything else keeps real errors (401, 400) loud while getting past bursts. Parallel requests are what usually trigger the 429s.
