Exercise
- Open exercise on codesandbox.
This exercise builds on the previous exercise using the
catchError()
operator. Note that I've added a newmessage
constant variable that is a reference to anHTMLDivElement
that displays an error message. By default, the div element is hidden using thehidden
class on the element. In thecatchError()
method I have removed thehidden
class. - Your task is to use the
finalize()
operator to add thehidden
class back to the div element after 5000 milliseconds.