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

Feat: expose AxiosError instance #362

Open
cangSDARM opened this issue Feb 1, 2023 · 0 comments
Open

Feat: expose AxiosError instance #362

cangSDARM opened this issue Feb 1, 2023 · 0 comments

Comments

@cangSDARM
Copy link

Expose the internally used util.createAxiosError and provide instance wrappers for common errors such as timeout, networkerror, etc., so that various generic errors can be returned by the custom reply method.

Motivation: I want to test our internal xx-retry library, and it is necessary to REPLY at the mock level to count the actual number of backend calls. But the current reply needs to write a lot of template code to construct the timeout correctly and test the count

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

No branches or pull requests

1 participant