-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retry when service is (tempoarily) unavailable #643
Comments
When receiving a 503 I would expect the code to automatically retry: (client/request {:url "https://httpbin.org/status/503"
:method :get
:retry-handler (fn [ex try-count http-context]
(println "Got:" ex)
(if (> try-count 4) false true))}) I read about the |
I don't think we should retry on 5XX responses by default, but it would be fine to expose the |
On the same ship, working with some APIs that sporadically show some 503 responses for a moment, would be great to expose the |
Retries work well with IOExceptions (like timeouts). 👍
I had assumed that retries would also be applied, when a service is reported (temporarily) unavailable like 502, 503 & 504
When reading about the Apache
HttpClient
, it seems aServiceUnavailableRetryStrategy
exists for the cases mentioned above.Is it on purpose this is left out of
clj-http
?The text was updated successfully, but these errors were encountered: