title: How to get body from HttpErrorResponse in Angular 6?
body: <p>I have created a REST API call in my Angular app which downloads a file.</p>
  
  <p>I am setting responseType to 'blob' since I am expecting a file in response.</p>
  
  <p>But when there is no file available at the server the Response has a error code as 404 i.e Bad Request with some message in body.</p>
  
  <p>But I am not able to parse that error message from body since HttpErrorResponse is giving a blob object in error.error</p>
  
  <p>How do I get the actual body from the error object instead of blob.</p>
  
  <p>Also is there any way to configure angular that on success of an api call parse the request in blob otherwise parse it in json ???</p>
  
  <p>Hoping for a resolution </p>