-
Notifications
You must be signed in to change notification settings - Fork 55
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 with given config leads to CanceledError #1232
Comments
Would you like to create a PR for this issue? |
In my opinion I would revert the commit of PR #1217. |
Sorry, now I saw the main problem of PR #1217. |
Thank you @trochol |
fix: clone axios args and req config #1232
Thanks for merging the PR @kamilmysliwiec! |
Thanks for this! |
Did you read the migration guide?
Is there an existing issue that is already proposing this?
Potential Commit/PR that introduced the regression
commit dcbc102
Versions
3.0.3 -> 3.1.0
Describe the regression
With the bugfix for the following issue a new bug was introduced:
#1217
Before the given config was cloned with the spread operator.
In the bugfix the config was taken as is and the
AxiosRequestConfig.cancelToken
was added if there was none in the config.Now, if you are using the rxjs retry and pass a config without CancelToken, the given config will be extended with the default CancelToken.
And if the request fails the retry subscribes again to observable with the original config, which then has a fulfilled CancelToken of the first try.
Minimum reproduction code
https://github.com/trochol/axios-retry/tree/main
Expected behavior
The retry operator should be able tosubscribe to the observable and a new CancelToken shall be added to the config.
Other
No response
The text was updated successfully, but these errors were encountered: