I, am trying to handle the http error using the below class in angular 6. I got a 401 unAuthorized status from server. But however I, don't see the console error message. HttpErrorsHandler.ts file import { ErrorHandler, Injectable} from '@angular/core'; @Injectable() export class HttpErrorsHandler implements ErrorHandler { handleError(error: Error) { // Do whatever you like with the error (send it to the server?) // And log it to the console console.error('It happens: ', error); } } app.module.ts file providers: [{provide: ErrorHandler, useClass: HttpErrorsHandler}], HttpCallFile import {