Two kinds of HTTP 429 errors and how Retry-After should be handled
A 429 status can signal either a brief burst limit or an exhausted monthly quota, yet the status code alone doesn't distinguish them. The author tested fetch, requests, got and ky against a local server returning 429s with one-second and 30-day Retry-After values. The RFCs define 429 and Retry-After but don't specify how a server should indicate which limit was hit, and the RateLimit header fields remain an unfinished IETF draft whose syntax changed between versions. Under the draft, Retry-After takes precedence when both headers appear, and the draft's quota-exceeded problem type doesn't distinguish rate limits from billing quotas. The results showed that fetch and a default requests session return the 429 without retrying, while urllib3's retry behavior and the other clients handled the waits differently.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in