hfortix_fortios.APIError

exception hfortix_fortios.APIError(message, http_status=None, error_code=None, response=None, endpoint=None, method=None, params=None, hint=None, request_id=None)[source]

Generic API error with optional metadata

message

Error message

http_status

HTTP status code (e.g., 400, 404, 500)

error_code

FortiOS internal error code (e.g., -5, -3)

response

Full API response dict

endpoint

API endpoint path (e.g., ‘/api/v2/cmdb/firewall/policy’)

method

HTTP method (GET, POST, PUT, DELETE)

params

Request parameters (sanitized)

hint

Helpful suggestion for resolving the error

request_id

Unique identifier for this request

timestamp

ISO 8601 timestamp when error occurred