How to handle error for response Type blob in HttpRequest : <p>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 causing problem with my error handling.</p>

<pre><code>this.httpClient.get('http://m502126:3000/reports/perdate', {
observe: 'body',
responseType: 'blob',
params: new HttpParams().set('START_DATE', startDate)
 .set('END_DATE', endDate)
 .set('MIXER', mixer)
 .set('ATTACH', 'true')

 }).subscribe(data =&gt; {
 console.log(data);
},
error =&gt; {
 console.log(error);

}

)
</code></pre>

<p>the problem is i am setting request type as'blob' and type of error is any . So when error comes and goes in error block the response type remains 'blob'. 
How to handle this ?</p>
