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

Unable to mock "no response received" #398

Open
adamgcoulon opened this issue Oct 4, 2024 · 1 comment
Open

Unable to mock "no response received" #398

adamgcoulon opened this issue Oct 4, 2024 · 1 comment

Comments

@adamgcoulon
Copy link

Is it possible to mock a lack of a response? I'd like to test Axios error handling when a request is made but the server does not respond. If I use .timeout(), the request object on the AxiosError is not present.

https://axios-http.com/docs/handling_errors

@SunburnedGoose
Copy link

I want to echo this. In these cases, the error message should include a request object to help identify when the error is due to a network issue. The missing request is not triggering the expected error handling in my code, and I cannot wholly test my services.

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

2 participants