Exceptions
⚠️ Exceptions¶
Exception classes for error handling.
⚠️ Exception Classes¶
NetworkHD API client exceptions.
This module defines custom exception classes for the NetworkHD API client. These exceptions provide detailed error information and help with debugging.
ConnectionError and TimeoutError shadow the builtins of the same name but also subclass them, so
except builtins.ConnectionError / except builtins.TimeoutError still catch them.
NetworkHDError
¶
Bases: Exception
Base exception for NetworkHD API errors
ConnectionError
¶
Bases: NetworkHDError, ConnectionError
Exception raised when connection fails or the client is not connected
ConnectionLostError
¶
ReconnectionError
¶
HostKeyMismatchError
¶
Bases: ConnectionError
Exception raised when the SSH server's host key matches none of the pinned fingerprints.
Raised before authentication, so the password is never sent to that server.
AuthenticationError
¶
TimeoutError
¶
Bases: NetworkHDError, TimeoutError
Exception raised when operations timeout, e.g. no response to a command
CommandError
¶
Bases: NetworkHDError
Exception raised when command execution fails
ResponseError
¶
Bases: NetworkHDError, ValueError
Exception raised when response parsing fails
UnknownCommandError
¶
Bases: CommandError
Exception raised when the device answers "unknown command" (unknown command or incorrect parameters)