-
Notifications
You must be signed in to change notification settings - Fork 165
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
Add the retryOnTimeout option #47
Conversation
ba43737
to
61db8ff
Compare
97d9018
to
afad5d3
Compare
Hi @yns01 , I have refactored the timeouts handling a bit: the check for timeouts is only done in one place. However, now the |
afad5d3
to
419d7f1
Compare
This is nice but I think you can do that with retryCondition. I don't know if is good idea start creating Boolean parameters only to apply a "custom retry logic". |
I understand that we can override the I also understand that the solution I propose isn't the best one but I couldn't find another way so far... :/ |
Any chance we could reconsider this PR? |
It's actually even more important than what I thought and I might want to rename the option to Indeed, axios uses |
+1, I would also like to see this feature released. In the meantime, this config should do the trick right? axiosRetry(axios, {
retries: 3,
shouldResetTimeout: true,
retryCondition: (error) => isNetworkOrIdempotentRequestError(error) || error.code === 'ECONNABORTED',
}); Technically this config would also retry non-idempotent requests (e.g. |
Have the same issue, can we fix it ? |
Yeah so far the only solution to retry on timeout. |
As requested in #39