I have created a REST API call in my Angular app which downloads a file.
I am setting responseType to \'blob\' since I am expecting a file in response.
But w
Try this
if(error.error instanceof Blob) { error.error.text().then(text => { let error_msg = (JSON.parse(text).message); console.log(error_msg) }); } else { //handle regular json error - useful if you are offline }