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
A good idea. I just wanted to ask the package developer to do this.
Add a statusForRetry field of type [] int to the Client structure,
and replace the if response.StatusCode >= http.StatusInternalServerError condition by checking whether http code is included in statusForRetry. Better still, make a map where the key is the http status, and the value is a structure with the timeout, retryCount, and callback function fields.
Currently looks like the retry mechanism will only engage if there's an actual error in sending the request, or if it's a 5xx response code.
It would be handy to be able to configure it so that it will retry on a non-2xx response code. I can do a PR if the maintainers are interested.
The text was updated successfully, but these errors were encountered: