I have a login endpoint that I'm send a request to with angular's Http.get. When I send incorrect login credentials I get a JSON response back from the server with an error code 401. I can't seem to find the JSON response in the error given to the error callback. This is an ionic 3 app using angular 4. How do I get that response body I see in PostMan out of the error given to me by Angular Http?
URL
http://localhost:8080/v1.0/login?rolename=Customer&username=customer00&password=wrongpass
Postman Response Body
{
"status": "login failed - bad credentials"
}
console.log("Error in login: " + JSON.stringify(error, undefined, 2));
Error in login: {
"_body": {
"isTrusted": true
},
"status": 0,
"ok": false,
"statusText": "",
"headers": {},
"type": 3,
"url": null
}