Error-Handling Patterns: Rethrow and Retry Strategies

Learn about the rethrow and retry strategies in error handling.

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 1300+ tech skills courses.