Error Handling Operators
Recover with catchError and retry.
Errors in observables
When an observable emits an error, it terminates: no more values, and the error handler runs. Error operators let you recover, retry, or transform errors instead of breaking the stream.
The error path
Handle errors in the observer or with operators. Without handling, an unhandled error can crash the subscription.
this.http.get('/api/data').subscribe({
next: d => console.log(d),
error: err => console.error('failed', err)
});All lessons in this course
- Transformation Operators
- Filtering Operators
- Combination Operators
- Error Handling Operators