Reactive Error Handling
Learn to handle errors that can be thrown in the data stream and the subscribe callback.
Error handling in RxJS overview
In this lesson, we will go through a very important concept: error handling in reactive streams.
In order to understand error handling in RxJS, you must first understand that an error can be thrown in the stream only once. This means that a stream can either complete successfully by emitting all the values or by throwing an error.
It is very important to understand that after an error is thrown inside the stream, it will not emit any other values.
RxJS provides a very simple mechanism to deal with errors: Every subscriber can provide three callbacks to the Observable:
- Success callback
- Error callback
- Finally callback
Get hands-on with 1400+ tech skills courses.