Error-Handling Patterns: Rethrow and Retry Strategies

The rethrow strategy

A rethrow strategy consists of rethrowing the error or, in other words, propagating the error to the subscribers of the output observable of catchError. This propagation mechanism allows us to rethrow the error caught by catchError and not only handle it locally. Let’s look at this example, which is the same as the replace strategy. The only difference is in the handling error function.

Get hands-on with 1200+ tech skills courses.