I, am trying to handle the http error using the below class in angular 6. I got a 401 unAuthorized status from …