-
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
All retries have timeout of 1ms set despite not being set anywhere that way #242
Comments
Can you provide details of the error when it does not retry so that we can better clarify the issue? |
After digging deeper I've realized that the error
Notice that it has a timeout of 2000ms (normally it's 12 seconds though I reduced it temporarily for testing this issue). After the requests fail, I get this:
Why is it trying again with a 1ms timeout? After initial (failing) request, it will (obviously) always fail again as timeout is 1ms. I think exponential backoff would be more appropriate. My observation is that after initial (real request, made by me, not I'm not setting
So even if the error in my original issue was misleading, the actual issue remains. (I've updated the original issue and title to reflect the actual problem) |
I suspect this might be caused by not setting the |
We have the following configuration:
However, it never tries to retry. I also tried adding aonRetry
handler, putting a console log inside. It never gets hit either, confirming that it indeed never retries.When I overrideretryCondition
it does get triggered though if I try to callisNetworkOrIdempotentRequestError
with the error in the callback, I getCannot read property 'status' of undefined
.After a failed request, axios-retry is retrying all requests with 1ms timeout, causing all of them to fail repeatedly.
What am I doing wrong?
(React Native 0.71.6, axios 0.27.2, axios-retry 3.3.1)
The text was updated successfully, but these errors were encountered: