mantelo.exceptions#
Exceptions#
Base exception for all exceptions raised by the Mantelo library. |
|
Exception raised when the authentication request fails with a 401 Unauthorized status code. |
|
Exception raised on HTTP errors when talking to the Keycloak Admin API. |
|
Called when the server tells us there was a client error (4xx). |
|
Called when the server sends a 404 error. |
|
Called when the server tells us there was a server error (5xx). |
|
The serializer for the content type is not available. |
Module Contents#
- exception mantelo.exceptions.ManteloException#
Bases:
ExceptionBase exception for all exceptions raised by the Mantelo library.
- exception mantelo.exceptions.AuthenticationException#
Bases:
ManteloExceptionException raised when the authentication request fails with a 401 Unauthorized status code.
- error: str#
The error message from Keycloak.
- error_description: str#
The error description from Keycloak.
- response: requests.Response#
The response object from the server.
- exception mantelo.exceptions.HttpException#
Bases:
ManteloExceptionException raised on HTTP errors when talking to the Keycloak Admin API.
- status_code: int#
The HTTP status code.
- json: dict#
The JSON response from the server, or an empty JSON if the body is not JSON.
- url: str#
The URL that was requested.
- response: requests.Response#
The response object from the server.
- classmethod from_response(response: requests.Response) HttpException#
- exception mantelo.exceptions.HttpClientError#
Bases:
HttpExceptionCalled when the server tells us there was a client error (4xx).
- exception mantelo.exceptions.HttpNotFound#
Bases:
HttpClientErrorCalled when the server sends a 404 error.
- exception mantelo.exceptions.HttpServerError#
Bases:
HttpExceptionCalled when the server tells us there was a server error (5xx).
- exception mantelo.exceptions.SerializerNoAvailable#
Bases:
ManteloExceptionThe serializer for the content type is not available.