provenaclient.utils.exceptions
Created Date: Thursday May 30th 2024 +1000 Author: Peter Baker —– Last Modified: Thursday May 30th 2024 10:17:36 am +1000 Modified By: Peter Baker —– Description: Defines a collection of exceptions produced by the Provena Client, extending a common base handled exception. —– HISTORY: Date By Comments ———- — ———————————————————
Exceptions
A custom exception class that inherits from python's base exception. |
|
An exception raised when a timeout occurs during an HTTP request. |
|
An exception raised for HTTP 400 Bad Request errors. |
|
An exception raised for HTTP 404 Not found exceptions. |
|
An exception raised for HTTP 401 Unauthorized errors. |
|
An exception raised for HTTP 422 Unprocessable Entity errors. |
|
An exception raised for HTTP 500+ Server Error responses. |
|
An exception that is raised for validation/parsing |
Module Contents
- exception provenaclient.utils.exceptions.BaseException(message: str, error_code: int | None = None, payload: str | None = None)[source]
Bases:
Exception
A custom exception class that inherits from python’s base exception.
- Parameters:
Exception (Exception) – Exception class provided by python.
- message: str
- error_code: int | None
- payload: str | None
- exception provenaclient.utils.exceptions.CustomTimeoutException(message: str, url: str | None)[source]
Bases:
httpx.TimeoutException
An exception raised when a timeout occurs during an HTTP request.
- Parameters:
BaseException – A custom exception class that inherits from python’s base exception and takes more parameters.
- message
- url
- exception provenaclient.utils.exceptions.BadRequestException(message: str, error_code: int | None = None, payload: str | None = None)[source]
Bases:
BaseException
An exception raised for HTTP 400 Bad Request errors.
- Parameters:
BaseException – A custom exception class that inherits from python’s base exception and takes more parameters.
- exception provenaclient.utils.exceptions.NotFoundException(message: str, error_code: int | None = None, payload: str | None = None)[source]
Bases:
BaseException
An exception raised for HTTP 404 Not found exceptions.
- Parameters:
BaseException – A custom exception class that inherits from python’s base exception and takes more parameters.
- exception provenaclient.utils.exceptions.AuthException(message: str, error_code: int | None = None, payload: str | None = None)[source]
Bases:
BaseException
An exception raised for HTTP 401 Unauthorized errors.
- Parameters:
BaseException – A custom exception class that inherits from python’s base exception and takes more parameters.
- exception provenaclient.utils.exceptions.HTTPValidationException(message: str, error_code: int | None = None, payload: str | None = None)[source]
Bases:
BaseException
An exception raised for HTTP 422 Unprocessable Entity errors.
- Parameters:
BaseException – A custom exception class that inherits from python’s base exception and takes more parameters.
- exception provenaclient.utils.exceptions.ServerException(message: str, error_code: int | None = None, payload: str | None = None)[source]
Bases:
BaseException
An exception raised for HTTP 500+ Server Error responses.
- Parameters:
BaseException – A custom exception class that inherits from python’s base exception and takes more parameters.
- exception provenaclient.utils.exceptions.ValidationException(message: str, error_code: int | None = None, payload: str | None = None)[source]
Bases:
BaseException
An exception that is raised for validation/parsing errors that occurs through the client library.
- Parameters:
BaseException – A custom exception class that inherits from python’s base exception and takes more parameters.