"""Custom exceptions for aiopnsense."""
[docs]
class OPNsenseError(Exception):
"""Base exception for aiopnsense errors."""
[docs]
class OPNsenseConnectionError(OPNsenseError):
"""Base exception for OPNsense connection failures."""
[docs]
class OPNsenseTimeoutError(OPNsenseConnectionError):
"""Raised when a request to OPNsense times out."""
[docs]
class OPNsenseSSLError(OPNsenseConnectionError):
"""Raised when an SSL error occurs during communication with OPNsense."""
[docs]
class OPNsenseInvalidURL(OPNsenseConnectionError):
"""Raised when an OPNsense URL is invalid."""
[docs]
class OPNsenseInvalidAuth(OPNsenseConnectionError):
"""Raised when OPNsense authentication fails."""
[docs]
class OPNsensePrivilegeMissing(OPNsenseConnectionError):
"""Raised when the authenticated user lacks required privileges."""
[docs]
class OPNsenseBelowMinFirmware(OPNsenseError):
"""Raised when the detected firmware is below the supported minimum."""
[docs]
class OPNsenseVoucherServerError(OPNsenseError):
"""Error from Voucher Server."""
[docs]
class OPNsenseUnknownFirmware(OPNsenseError):
"""Unknown current firmware version."""