BadResponseError Exception

class rosteron.exceptions.BadResponseError(purpose: str)

BadResponseError exceptions are raised when the RosterOn server returns a response that doesn’t satisfy the needs of the current operation.

This could happen when an incorrect Session URL is used, when the RosterOn server is down, when a login error other than “bad username/password” occurs, or when logout occurs at an unexpected time.

The exception message includs the type of output that was expected (login, home, roster, or logout).

>>> from rosteron import exceptions
>>> raise exceptions.BadResponseError('login')
Traceback (most recent call last):
  File "<input>", line 1, in <module>
rosteron.exceptions.BadResponseError: RosterOn returned an unexpected response for an operation expecting 'login'