toSignal
or async
pipe as we saw in previous lessonsnext
, error
, and complete
scenarios.next
: This is triggered when the HTTP request successfully returns user data. You handle the emitted value (users
) here.error
: This is triggered if the HTTP request fails (e.g., network issues, server errors), allowing you to handle the error case.complete
: This is called when the observable completes its emission, meaning no more values will be emitted.catchError
Operator