ex
ex copied to clipboard
[NOTICKET] Handle Retry-After header in HTTP Client
Looks like a couple new nolints are required in the refactored tests
Looks like a couple new nolints are required in the refactored tests
Oh this was supposed to be a draft... I'm still trying to figure out if there's a less awful way to test these
If I'm understanding the code correctly, this change would "block" any calls that are made using the client during the rate limiting window but doesn't handle retrying those calls? So whoever is using the HTTP client would have to explicitly implement retry logic themselves?
If I'm understanding the code correctly, this change would "block" any calls that are made using the client during the rate limiting window but doesn't handle retrying those calls? So whoever is using the HTTP client would have to explicitly implement retry logic themselves?
When we receive a 429 it's a signal from the service to back off, we explicitly don't retry those. Specifically the 429 with a Retry-After header, it's desireable for those requests to not be retried until (for example) the worker loop picks that up again. It effectively throttles throughput on the basis that the downstream cannot handle the number of requests.