APIException class - Platform - BlueCat Gateway - 19.8.1

Gateway Administration Guide

Locale
English (United States)
Product name
BlueCat Gateway
Version
19.8.1

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

Exception: api_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_details()

Get further details about the exception (may be None).

get_message()

Get a message describing the exception.

AuthenticationError

Exception: api_exception.AuthenticationError(message, status_code=None, payload=None)

Bases: api_exception.RESTException

An error representing Invalid username or password.

code = 401
name = 'Unauthourized'

BAMException

Exception: api_exception.BAMException(message, details=None)

Bases: api_exception.APIException

A class representing exceptions raised by BAM.

ConnectionError

Exception: api_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

Exception: api_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