In this case, if the error object is undefined/null, then error.messsage throws a TypeError, and the spinner is not hidden.
In general the finally { ... } block is useful because it is guaranteed to execute after the try/catch (if the program has not exited), where as the next line after the try/catch is not, e.g., the try/catch returns, or the catch block throws.