You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
This might actually be more of a question than an actual issue:
The http.Client.Get doc states that:
An error is returned if the Client's CheckRedirect function fails or if there was an HTTP protocol error. A non-2xx response doesn't cause an error.
My understanding is that a retryablehttp.Client with default configuration would behaves similarly, retrying up to 4 times, and returning the response, no matter what the status code is, as long as there is no error.
But it seems that if the client doesn't get a success status in the configured number of retries, it WILL return an error similar to Get ...: GET ... giving up after 5 attempt(s), instead of returning the response with the non success status code.
Am I misunderstanding the doc?
Anyway, setting the client's ErrorHandler to retryablehttp.PassthroughErrorHandler seems to give what I expected to be the default behavior.
The text was updated successfully, but these errors were encountered:
Hello,
This might actually be more of a question than an actual issue:
The
http.Client.Get
doc states that:My understanding is that a
retryablehttp.Client
with default configuration would behaves similarly, retrying up to 4 times, and returning the response, no matter what the status code is, as long as there is no error.But it seems that if the client doesn't get a success status in the configured number of retries, it WILL return an error similar to
Get ...: GET ... giving up after 5 attempt(s)
, instead of returning the response with the non success status code.Am I misunderstanding the doc?
Anyway, setting the client's
ErrorHandler
toretryablehttp.PassthroughErrorHandler
seems to give what I expected to be the default behavior.The text was updated successfully, but these errors were encountered: