How Does RxJS Observable Error Handling Work?

preview_player
Показать описание
The code in our data service that calls the HttpClient service is our first line of defense against HTTP errors. It's here that we have the observable returned by the HttpClient service.

If the backend server generates an error, it returns that error in the HTTP response. The HttpClient service then uses the returned observable to emit an error notification with error details. This errored observable ends and won't emit any more items.

It's here in our data service that we catch that error. This prevents the error from continuing down the subscription chain.

This content is from my upcoming Pluralsight course: "RxJS and Angular Signals Fundamentals"

*Links*

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
😊About Me
Hey! I'm Deborah Kurata
I'm a software developer and YouTube content creator. I speak at conferences such as VS Live and ng-conf. I write articles for freeCodeCamp. And I'm a Pluralsight author with courses in the top 10 most popular (out of 10,000+) over the past 5 years. For my work in support of software developers, I've been recognized with the Microsoft Most Valuable Professional (MVP) award, and I'm a Google Developer Expert (GDE).

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
#angular #angulartutorial #bestpractices #demo #errorhandling #exceptionhandling #rxjsangular #angularrxjs #catcherror
Рекомендации по теме
Комментарии
Автор

Hi Deborah, ngrx 16 supports signals, so I would like to take your explanation about it :)

ebichu