Catcherror in Angular Observable
Dealing with errors is one of the most challenging challenges in asynchronous programming. We cannot simply apply the try/catch/finally strategy that we employ when dealing with blocking code, as opposed to interactive style programming.
An RxJs Operator is Angular CatchError. It can be used to handle errors that the Angular Observable throws. The CatchError operator uses an observable as input and output much like the other RxJs operators do (or throws an error). We can throw a user-defined error or offer a substitute observable using CatchError.
Catch error throw above