I am calling an http request using httpClient and using response Type as \'blob\' but the problem is when it goes in error block the response type remains \'blob\'.This is c
It can also be done with: error.text()
this.dataService .getFile() .subscribe((response) => { FileSaver.saveAs(response.body, 'file.txt'); }, async (error) => { const message = JSON.parse(await error.error.text()).message; this.toast.error(message, 'Error'); });