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.
API Exception wrapper
exceptionapi_exception.APIException(message, details=None)
Bases: exceptions.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.
Parameter | Description |
---|---|
message | Primary string describing why the exception was raised. |
details | Details, where available, of the specific exception. |
Get further details about the exception (may be None).
Get a message describing the exception.
AuthenticationError
exceptionapi_exception.AuthenticationError(message, status_code=None, payload=None)
Bases: api_exception.RESTException
An error representing Invalid username or password.
code = 401 name = 'Unauthourized'
BAMException
exceptionapi_exception.BAMException(message, details=None)
Bases: api_exception.APIException
A class representing exceptions raised by BAM.
ConnectionError
exceptionapi_exception.ConnectionError(message, status_code=None, payload=None)Bases: api_exception.RESTException
An error representing a Portal connection error which is not authentication.
code = 404 name = 'Not Found'
PortalException
exceptionapi_exception.PortalException(message, details=None)
Bases: exceptions.Exception
Base class for AuthenticationError and ConnectionError exceptions
code = 400 to_dict()
Return the byte string representation of obj