I had a clarification on usage of intercepting ErrorHandler for handling custom error for HTTP requests and client side errors in Angular 6+.
Its getting called correctly for client side errors. But for HTTP errors custom error handler not getting called when there is a error handler added HTTP request subscriber(See below code). Same time custom error handler get called when error handler removed from subscriber. Is that expected behavior. Couldn't find any doc related to that in Angular doc.
.subscribe(
success => {
this.processGetChart(success);
},
error => {
this.errors = error;
console.log('API Error: ', error);
},
() => {
}
);
Thanks,
Peter