Global Error Handling in Angular

preview_player
Показать описание

Using HTTP interceptor we can create a global error handler for HTTP operations.
In HTTP error handling, we use RxJS operators, some of them are as below.
retry : Resubscribe to the source stream for the given number of time, when there is error.
catchError : Catches error to handle and returns new observable or throws error.
throwError : Creates an observable for error to be thrown when subscribed.
Рекомендации по теме