A class representing API exceptions. Most of these are things returned by the BAM API but other errors (such as failure to SSH to a server and a non-zero exit from nsupdate) can also result in exceptions being raised.
exception bluecat.api_exception.APIException(message, details=None)
Bases: Exception
Create a new instance with a message and optional details. The content of these fields is not intended to be interpreted by software, but to appear near the top of a program to be easily seen and consumed by the user.
Parameters | Description |
---|---|
message | Primary string describing why the exception was raised. |
details | Details, where available, of the specific exception. |
get_details()
Get further details about the exception (may be None)
get_message()
Get a message describing the exception.
exception bluecat.api_exception.AuthenticationError(message, status_code=None, payload=None)
Bases: bluecat.api_exception.RESTException
An error representing Invalid username or password.
code = 401
name = 'Unauthourized'
exception bluecat.api_exception.BAMException(message, details=None)
Bases: bluecat.api_exception.APIException
A class representing exceptions raised by BAM.
exception bluecat.api_exception.PortalConnectionError(message, status_code=None, payload=None)
Bases: bluecat.api_exception.RESTException
An error representing a Portal connection error which is not authentication.
code = 404
name = 'Not Found'
exception bluecat.api_exception.PortalException(message, details=None)
Bases: bluecat.api_exception.APIException
A class representing exceptions raised by the BlueCat Gateway.
exception bluecat.api_exception.RESTException(message, status_code=None, payload=None)
Bases: Exception
Base class for AuthenticationError and ConnectionError exceptions
code = 400
to_dict()
Returns: Return as a dictionary
bluecat.api_exception.safe_str(obj)
Return the byte string representation of obj