Skip to content
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

fix: preserve configuration for custom instance #240

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

orgads
Copy link
Contributor

@orgads orgads commented Nov 16, 2023

Fixes #68.

@@ -175,7 +175,7 @@ async function onError(error: AxiosError) {
config.retry = typeof config.retry === 'number' ? config.retry : 3;
config.retryDelay =
typeof config.retryDelay === 'number' ? config.retryDelay : 100;
config.instance = config.instance || axios;
config.instance = config.instance || instance;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think config.instance can be deprecated following this change.

@JustinBeckwith
Copy link
Owner

I haven't been paying a ton of attention to axios API changes, but this generally seems good if the tests pass 😆 Could I trouble you to run npm run fix and push the changes back up?

@orgads
Copy link
Contributor Author

orgads commented Nov 16, 2023

Done

@JustinBeckwith JustinBeckwith merged commit 2e4e702 into JustinBeckwith:main Nov 16, 2023
6 checks passed
@orgads orgads deleted the retry-instance branch November 16, 2023 19:10
Copy link

🎉 This PR is included in version 3.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I set retry 3 times,but only retry 1 times
2 participants