APIException class - Platform - BlueCat Gateway - 19.8.1

Gateway Administration Guide

English (United States)
Product name
BlueCat Gateway

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 further details about the exception (may be None).


Get a message describing the exception.


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'


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

Bases: api_exception.APIException

A class representing exceptions raised by BAM.


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'


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

Bases: exceptions.Exception

Base class for AuthenticationError and ConnectionError exceptions

code = 400

Return the byte string representation of obj