#
Exceptions
All exceptions in capmonster_python inherit from CapmonsterException.
#
CapmonsterException
class CapmonsterException(Exception)
Generic base exception for all errors. Raised for errors not caught by more specific exception classes, including HTTP request failures and unexpected issues.
#
CapmonsterAPIException
class CapmonsterAPIException(CapmonsterException)
Raised when the Capmonster Cloud API returns an error response.
#
Constructor
CapmonsterAPIException(error_id, error_code, error_description)
#
String representation
[ERROR_CODE] Error description
#
CapmonsterValidationException
class CapmonsterValidationException(CapmonsterException)
Raised when a task configuration is invalid at the SDK level (before any API call is made).
#
Constructor
CapmonsterValidationException(message: str, *, field: str = None, task: str = None)
#
String representation
[CapmonsterValidationError] message (field: fieldName) [task: TaskType]