-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Ajax response with status 0 must throw an error #3606
Labels
bug
Confirmed bug
Comments
This bug prevents me from catching errors when a user makes an XHR request with a downed network, independent of a timeout value being set. |
Workaround: tap(response => {
if (response.status === 0) {
throw Object.assign(new Error('Ajax status 0'), response)
}
}), |
I believe #3653 also fixes the issue with down network: moving the next() logic from |
89 tasks
In which version was this actually fixed? |
Closed by #3653 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If ajax observable has parameter timeout configured, with a slow request, ajax is emitting a next instead of an error.
RxJS version:
6.0.0
Code to reproduce:
Expected behavior:
Emit an error event with an AjaxError object
Actual behavior:
Emit a next event with ajax null response and status 0
The text was updated successfully, but these errors were encountered: