๐ข catchError
Information
How to Use the Application
Our application features a form with a text input box and a โFetchโ button. Upon clicking the โFetchโ button, data is retrieved from a free API.
The correct values for a successful response are limited to: posts, comments, albums, photos, todos, and users. Any other values will result in an error response.
Bug
A bug has been identified in our application. Users are only able to successfully fetch data until an invalid request is sent. Once an error response is received, users are unable to send additional requests.
Learnings
This application provides an opportunity to understand the correct placement of a catchError
operator. If placed incorrectly, the overall subscription will be completed, preventing users from sending more requests. The goal is to preserve the overall subscription by handling error notifications from inner observables appropriately.
Statement
The goal is to use the catchError operator to handle error management inside your Rxjs stream.
Constraints
Users should be able to log the value/error each time they click the โFetchโ button.