Exceptions

Custom exceptions raised by the ROAK SDK.

exception roak_sdk.roak_error.RoakError[source]

Bases: Exception

Base exception for all ROAK SDK errors.

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception roak_sdk.roak_error.AuthenticationError(status_code, message=None)[source]

Bases: RoakError

Raised when authentication fails.

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception roak_sdk.roak_error.MissingUsernameError[source]

Bases: RoakError

Raised when no username is provided.

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception roak_sdk.roak_error.MissingPasswordError[source]

Bases: RoakError

Raised when no password is provided.

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception roak_sdk.roak_error.MissingTokenError[source]

Bases: RoakError

Raised when access token is missing from authentication response.

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception roak_sdk.roak_error.MissingRefreshTokenError(message=None)[source]

Bases: RoakError

Raised when refresh token is missing but required.

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception roak_sdk.roak_error.InvalidJSONError[source]

Bases: RoakError

Raised when response cannot be parsed as JSON.

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception roak_sdk.roak_error.TokenExpiredError[source]

Bases: RoakError

Raised when the access token has expired.

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.