Skip to content

exceptions

FMG API exceptions

FMGAuthenticationException #

Bases: FMGException

Authentication error

FMGConfigurationException #

Bases: FMGException

FMG configuration problem

FMGDataSrcDuplicateException #

Bases: FMGException

Duplicate name found in data namespace

FMGException #

Bases: Exception

General FMG error

FMGHTTPException #

FMGHTTPException(status_code: int)

Bases: FMGException

An HTTP error prevented FortiManager from returning a JSON-RPC result.

Source code in pyfortinet/exceptions.py
def __init__(self, status_code: int):
    self.status_code = status_code
    super().__init__(f"FortiManager HTTP request failed with status {status_code}")

FMGInvalidDataException #

Bases: FMGException

The data is invalid for selected url

FMGInvalidURL #

Bases: FMGException

Invalid URL

FMGLockException #

Bases: FMGException

Locking error

FMGLockNeededException #

Bases: FMGException

Lock needed error

FMGMissingMasterKeyException #

Bases: FMGException

Master key is missing for this API class

FMGMissingScopeException #

Bases: FMGException

Scope must be set before referencing URL

FMGNotAssignedException #

Bases: FMGException

FMG not assigned to object

FMGObjectAlreadyExistsException #

Bases: FMGException

The object is already in the database

FMGObjectNotExistException #

Bases: FMGException

Object does not exist

FMGTokenException #

Bases: FMGException

No Token error

FMGUnhandledException #

Bases: FMGException

Unhandled error

FMGWrongRequestException #

Bases: FMGException

Locking error