Exceptions

Exception hierarchy for Akuvox device communication errors.

exception pylocal_akuvox.exceptions.AkuvoxError[source]

Bases: Exception

Base exception for all Akuvox-related errors.

exception pylocal_akuvox.exceptions.AkuvoxConnectionError[source]

Bases: AkuvoxError

Network or timeout failure communicating with the device.

exception pylocal_akuvox.exceptions.AkuvoxAuthenticationError[source]

Bases: AkuvoxError

Authentication rejected by the device (HTTP 401).

exception pylocal_akuvox.exceptions.AkuvoxRequestError[source]

Bases: AkuvoxError

Invalid request parameters (HTTP 400).

exception pylocal_akuvox.exceptions.AkuvoxDeviceError[source]

Bases: AkuvoxError

Device-side error (HTTP 500 or non-zero retcode).

exception pylocal_akuvox.exceptions.AkuvoxParseError[source]

Bases: AkuvoxError

Non-JSON or malformed response from the device.

exception pylocal_akuvox.exceptions.AkuvoxUnsupportedError[source]

Bases: AkuvoxError

Operation unsupported by the connected device.

Carries optional structured fields when raised from the capability-aware surfacing layer (the per-method gate in pylocal_akuvox.AkuvoxDevice and the relay-trigger adapter dispatch in pylocal_akuvox.capability_adapters); falls back to a message-only form when raised from the legacy HTTP-envelope classifier in pylocal_akuvox._http (for example when the device returns the well-known Api unsupported envelope).

Backward compatibility is preserved: AkuvoxUnsupportedError(msg) still constructs an instance with .args == (msg,), str(exc) == msg, and every structured field set to None.

capability

The pylocal_akuvox.Capability whose absence triggered this error, or None when raised from a layer without capability context.

device_class

The detected device class string (e.g. "IT83"), or None if unrecognised at the time of the raise.

reason

Structured reason code drawn from the closed set {"capability_missing", "capability_unknown", "device_unrecognized", "adapter_missing", "envelope_unsupported", None}. See specs/008-capability-matrix/contracts/unsupported-error.md for the full taxonomy.

__init__(message, *, capability=None, device_class=None, reason=None)[source]

Construct an unsupported-operation error.

Parameters:
  • message (str) – Human-readable description of the failure.

  • capability (Capability | None) – Optional Capability that was rejected.

  • device_class (str | None) – Optional device-class string (e.g. "IT83").

  • reason (str | None) – Optional structured reason code; see class docstring for the closed set.

Return type:

None

exception pylocal_akuvox.exceptions.AkuvoxValidationError[source]

Bases: AkuvoxError

Local validation failure before sending request.