Source code for pylocal_akuvox.exceptions
# SPDX-FileCopyrightText: 2026 Andrew Grimberg <tykeal@bardicgrove.org>
# SPDX-License-Identifier: Apache-2.0
"""Exception hierarchy for Akuvox device communication errors."""
[docs]
class AkuvoxError(Exception):
"""Base exception for all Akuvox-related errors."""
[docs]
class AkuvoxConnectionError(AkuvoxError):
"""Network or timeout failure communicating with the device."""
[docs]
class AkuvoxAuthenticationError(AkuvoxError):
"""Authentication rejected by the device (HTTP 401)."""
[docs]
class AkuvoxRequestError(AkuvoxError):
"""Invalid request parameters (HTTP 400)."""
[docs]
class AkuvoxDeviceError(AkuvoxError):
"""Device-side error (HTTP 500 or non-zero retcode)."""
[docs]
class AkuvoxParseError(AkuvoxError):
"""Non-JSON or malformed response from the device."""
[docs]
class AkuvoxUnsupportedError(AkuvoxError):
"""API endpoint not supported by the device firmware."""
[docs]
class AkuvoxValidationError(AkuvoxError):
"""Local validation failure before sending request."""