-
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
Unhandled exception is thrown if AjaxObservable fails to parse response #3138
Comments
myklt
added a commit
to myklt/rxjs
that referenced
this issue
Nov 28, 2017
Catch error when parsing json response and notify observer with thrown error. JSON could be invalid if proxy overtakes the response and in IE responseType is empty. closes ReactiveX#3138
Any plans to merge this in? I'm running into the same problem. |
cartant
pushed a commit
to myklt/rxjs
that referenced
this issue
Jul 7, 2018
Catch error when parsing json response and notify observer with thrown error. JSON could be invalid if proxy overtakes the response and in IE responseType is empty. closes ReactiveX#3138
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
RxJS version: 5.5.2
Code to reproduce:
Please find test cases in the PR which will follow up the issue.
Expected behavior:
AjaxObservable sends an error to subscribers which could be caught using
catchError
operator.Actual behavior:
If
responseType
is''
in response, but it was set tojson
in request and xhr'sresponse
orresponseText
is not valid JSON, the unhandled error "Invalid character" is thrown.Additional information:
The error is reproducible with IE11 only. Once the resource is not found, there is a proxy on our server, which overtakes the response and returns HTML 404 page.
The text was updated successfully, but these errors were encountered: