10.8.7. Exceptions for Results

Exceptions and warnings for pytan3.results.

exception pytan3.results.exceptions.ModuleError[source]

Bases: pytan3.exceptions.PyTanError

Parent of all exceptions for pytan3.results.

Thrown by:
exception pytan3.results.exceptions.ModuleWarning[source]

Bases: pytan3.exceptions.PyTanWarning

Parent of all warnings for pytan3.results.

Thrown by:

exception pytan3.results.exceptions.ResponseError(result, error)[source]

Bases: pytan3.results.exceptions.ModuleError

Thrown when a response has an general/uncategorized error.

Thrown by:
__init__(result, error)[source]

Constructor.

Parameters:
result = None

pytan3.results.Result – Object exception was thrown from.

response_body = None

str – Trimmed response body.

request_object_obj = None

object – Pretty printed objects from request.

error = None

str – Error message that was thrown.

exception pytan3.results.exceptions.ObjectExistsError(result, error)[source]

Bases: pytan3.results.exceptions.ResponseError

Thrown when a response tells us the object already exists.

Thrown by:
exception pytan3.results.exceptions.ObjectNotFoundError(result, error)[source]

Bases: pytan3.results.exceptions.ResponseError

Thrown when a response tells us the object already exists.

Thrown by:
exception pytan3.results.exceptions.TextDeserializeError(result, text, src, exc)[source]

Bases: pytan3.results.exceptions.ModuleError

Thrown when deserializing a string into python object.

Thrown by:
__init__(result, text, src, exc)[source]

Constructor.

Parameters:
  • result (pytan3.results.Result) – Object exception was thrown from.
  • text (str) – Text that was being deserialized into python object.
  • src (str) – Description of where text came from.
  • exc (Exception) – Exception that occurred during deserialization.
result = None

pytan3.results.Result – Object exception was thrown from.

text = None

str – Text that was being deserialized into python object.

src = None

str – Description of where text came from.

exc = None

Exception – Exception that occurred during deserialization.

error = None

str – Error message that was thrown.

exception pytan3.results.exceptions.ApiWrongRequestType(result, error)[source]

Bases: pytan3.results.exceptions.ModuleError

Thrown when get result data/object API obj but request is not of that type.

Thrown by:
__init__(result, error)[source]

Constructor.

Parameters:result (pytan3.results.Result) – Object exception was thrown from.
result = None

pytan3.results.Result – Object exception was thrown from.

error = None

str – Error message that was thrown.

exception pytan3.results.exceptions.DictionaryPathError(result, obj, path, src, exc)[source]

Bases: pytan3.results.exceptions.ModuleError

Thrown when a response has an error when deserializing.

Thrown by:
__init__(result, obj, path, src, exc)[source]

Constructor.

Parameters:
  • result (pytan3.results.Result) – Object exception was thrown from.
  • obj (dict) – Dictionary to traverse using path.
  • path (str) – Nested dictionary keys seperated by / to traverse in obj.
  • src (str) – Where obj came from, used in error text.
  • exc (Exception) – Original exception thrown.
result = None

pytan3.results.Result – Object exception was thrown from.

obj = None

dict – Dictionary to traverse using path.

path = None

str – Nested dictionary keys seperated by / to traverse in obj.

src = None

str – Where obj came from.

exc = None

Exception – Original exception thrown.

error = None

str – Error message that was thrown.