Exceptions Reference
pydiagral.exceptions
Module defining custom exceptions for the Diagral API.
DiagralAPIError
Bases: Exception
Base exception for Diagral API errors.
Source code in src/pydiagral/exceptions.py
4 5 6 7 8 9 10 11 12 13 14 15 | |
__init__(message, status_code=None)
Initialize the DiagralAPIError.
:param message: The error message. :param status_code: The status code of the error, if any.
Source code in src/pydiagral/exceptions.py
7 8 9 10 11 12 13 14 15 | |
ConfigurationError
Bases: DiagralAPIError
Raised when configuration is invalid.
Source code in src/pydiagral/exceptions.py
18 19 | |
SessionError
Bases: DiagralAPIError
Raised when session is invalid.
Source code in src/pydiagral/exceptions.py
22 23 | |
AuthenticationError
Bases: DiagralAPIError
Raised when authentication fails.
Source code in src/pydiagral/exceptions.py
26 27 | |
ValidationError
Bases: DiagralAPIError
Raised when validation fails.
Source code in src/pydiagral/exceptions.py
30 31 | |
ModelValidationError
Bases: ValidationError, ValueError
Raised when data does not satisfy a model's constraints.
Also a ValueError, which is what model validation raised before.
Source code in src/pydiagral/exceptions.py
34 35 36 37 38 | |
ServerError
Bases: DiagralAPIError
Raised when server returns 5xx error.
Source code in src/pydiagral/exceptions.py
41 42 | |
ClientError
Bases: DiagralAPIError
Raised when client returns error.
Source code in src/pydiagral/exceptions.py
45 46 | |
APIKeyCreationError
Bases: DiagralAPIError
Raised when API key creation fails.
Source code in src/pydiagral/exceptions.py
49 50 | |
APIValidationError
Bases: DiagralAPIError
Raised when API validation fails.
Source code in src/pydiagral/exceptions.py
53 54 | |