esdc_api.exceptions¶
This module contains all exceptions used by the Danube Cloud API library.
-
exception
esdc_api.exceptions.
ESAPIException
¶ Bases:
exceptions.Exception
Danube Cloud API base exception.
-
exception
esdc_api.exceptions.
ESAPIRuntimeError
¶ Bases:
esdc_api.exceptions.ESAPIException
,exceptions.RuntimeError
Danube Cloud API HTTP client errors.
Can be raised during HTTP content fetching and parsing.
-
exception
esdc_api.exceptions.
ESAPIError
(status_code, detail, dc, task_status=None, task_id=None)¶ Bases:
esdc_api.exceptions.ESAPIException
Raised for all API errors incoming from Danube Cloud server.
Parameters: - status_code – HTTP response status code.
- detail – Detailed information about the API error.
- dc – Danube Cloud virtual datacenter in which the error occurred.
- task_status – Task status (optional).
- task_id – Task ID (optional).
-
exception
esdc_api.exceptions.
ServerError
(status_code, detail, dc, task_status=None, task_id=None)¶ Bases:
esdc_api.exceptions.ESAPIError
Danube Cloud API 5xx server errors.
-
exception
esdc_api.exceptions.
ClientError
(status_code, detail, dc, task_status=None, task_id=None)¶ Bases:
esdc_api.exceptions.ESAPIError
Danube Cloud API 4xx errors.
-
exception
esdc_api.exceptions.
TaskError
(status_code, detail, dc, task_status=None, task_id=None)¶ Bases:
esdc_api.exceptions.ESAPIError
Base class for all Danube Cloud task errors.
-
exception
esdc_api.exceptions.
TaskFailure
(status_code, detail, dc, task_status=None, task_id=None)¶ Bases:
esdc_api.exceptions.TaskError
The task has failed.
The
detail
attribute will contain details about the failure.
-
exception
esdc_api.exceptions.
TaskRevoked
(status_code, detail, dc, task_status=None, task_id=None)¶ Bases:
esdc_api.exceptions.TaskError
The task has been revoked.
The
detail
attribute will contain the revocation reason.