Exercise
This is exercise is similar to the previous exercise, so we'll start with the solution to the throwError()
operator exercise.
- Open exercise on codesandbox.
- Remove the truthy/falsey check of the
value
property values for theemail
andpassword
input elements. - Within the
mergeMap()
return the Observable created by theajax.post()
method. - Use the
catchError()
on the inner Observable returned by theajax.post()
method to catch an HTTP error response. For simplicity, use theconsole.error()
method to log the error to the console. Then, rethrow the error using thethrowError()
operator.