Skip to content

Http does not return a Response obj when an Error occurs#1

Open
WouterSpaak wants to merge 2 commits intomasterfrom
fix-http-requests
Open

Http does not return a Response obj when an Error occurs#1
WouterSpaak wants to merge 2 commits intomasterfrom
fix-http-requests

Conversation

@WouterSpaak
Copy link
Collaborator

Angular HttpService does not return a Response object when an Http error occurs. That means that the .json() method on a Response will fail on an error handler.

When an error occurs, you need to rethrow it wrapped in an Observable (or perhaps do something with it).

This will probably not fix the Http Error 400: Bad Request errors, but it will at least make the errors legible.

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

Successfully merging this pull request may close these issues.

1 participant