What does `$error = false` do here?  the method is `throwError()`, so aren't all messages errors?