Exceptions

Exceptions collection for the rt library.

exception rt.exceptions.APISyntaxError[source]

Exception raised when syntax error is received.

exception rt.exceptions.AuthorizationError[source]

Exception raised when module cannot access API due to invalid or missing credentials.

exception rt.exceptions.BadRequestError[source]

Exception raised when HTTP code 400 (Bad Request) is received.

exception rt.exceptions.ConnectionError(message: str, cause: Exception)[source]

Encapsulation of various exceptions indicating network problems.

__init__(message: str, cause: Exception) None[source]

Initialization of exception extended by cause parameter.

Parameters:
  • message – Exception details

  • cause – Cause exception

exception rt.exceptions.InvalidQueryError[source]

Exception raised when attempting to search RT with an invalid raw query.

exception rt.exceptions.InvalidUseError[source]

Exception raised when API method is not used correctly.

exception rt.exceptions.NotAllowedError[source]

Exception raised when request cannot be finished due to insufficient privileges.

exception rt.exceptions.NotFoundError[source]

Exception raised if requested resource is not found.

exception rt.exceptions.RtError[source]

Super class of all Rt Errors.

exception rt.exceptions.UnexpectedMessageFormatError[source]

Exception raised when response has bad status code (not the HTTP code, but code in the first line of the body as 200 in RT/4.0.7 200 Ok) or message parsing fails because of unexpected format.

exception rt.exceptions.UnexpectedResponseError(message: str, status_code: int | None = None, response_message: str | None = None)[source]

Exception raised when unexpected HTTP code is received.

__init__(message: str, status_code: int | None = None, response_message: str | None = None) None[source]

Initialization.