-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
Description
Description
When making API requests, some providers implement rate limits: for example, an API might define that you can only perform 50 requests in five seconds. All exceeding requests will be answered with error code 429 ("Too many requests").
Currently, this error is not caught or handled anywhere. A future solution could catch this directly somewhere in the core HttpClient and react to it: simply wait for some time (maybe the response's headers already tell you how long to wait?) and retry the request.
@nicolas-grekas already provided the first steps in #36779, and I'd like to see how this could help to resolve 429 responses
bohanyang, wouterj, kissifrot and Moongazer