-
Notifications
You must be signed in to change notification settings - Fork 169
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 not working on HTTP 502 #262
Comments
Hi, I'm having a similar problems where although this behavior is not consistent and it does catch the error some times, (mostly ECONNREFUSED in my case). I'm using the following versions: "axios": "^1.6.7" & "axios-retry": "^4.0.0". i'm not sure how to go about diagnosing this issue but i hope you guys can reproduce and solve it. best regards, |
Can you guys provide a minimum example reproducing the issue? |
I am having a similar issue, v4.0.0 / axios 1.6.0. I have setup I have a request that returns 401 (intentionally). It always retries only 1 or 2 two times (seemingly inconsistently) and then returns the error. I am using CJS.
EDIT: I believe I've figured it out. If you have a timeout set in your request options (for example, 3000ms) that timeout seems to apply across all requests, instead of each request retry. So the reason my requests were inconsinstely failing was because sometimes they took 30 seconds to timeout, and would eat up most of my timeout. Here is a reproducible script:
Which results in very confusing behavior:
I would expect to see a timeout error (which is what actually happened) but instead we get back the last error we saw. @mindhells Is this intended? EDIT (last, hopefully): I should've RTFM. I just found shouldResetTimeout. Obviously user error, but I'm going to leave this here in case it happens to someone else. |
Hi there,
After few months in production, just realized that some HTTP code are not retried as HTTP 502.
retryCondition
is configured to return always TRUE. But its not retried and not getting any logs fromonRetry
.I'm using the following versions: "axios": "^1.3.5" & "axios-retry": "^4.0.0"
Thank you guys for maintaining this great project ! :-)
Best,
Tim
The text was updated successfully, but these errors were encountered: