| 1 |
"""Ubiquiti AirOS Exceptions.""" |
| 2 |
|
| 3 |
|
| 4 |
class AirOSException(Exception): |
| 5 |
"""Base error class for this AirOS library.""" |
| 6 |
|
| 7 |
|
| 8 |
class AirOSConnectionSetupError(AirOSException): |
| 9 |
"""Raised when unable to prepare authentication.""" |
| 10 |
|
| 11 |
|
| 12 |
class AirOSConnectionAuthenticationError(AirOSException): |
| 13 |
"""Raised when unable to authenticate.""" |
| 14 |
|
| 15 |
|
| 16 |
class AirOSDataMissingError(AirOSException): |
| 17 |
"""Raised when expected data is missing.""" |
| 18 |
|
| 19 |
|
| 20 |
class AirOSKeyDataMissingError(AirOSException): |
| 21 |
"""Raised when return data is missing critical keys.""" |
| 22 |
|
| 23 |
|
| 24 |
class AirOSDeviceConnectionError(AirOSException): |
| 25 |
"""Raised when unable to connect.""" |
| 26 |
|
| 27 |
|
| 28 |
class AirOSDiscoveryError(AirOSException): |
| 29 |
"""Base exception for AirOS discovery issues.""" |
| 30 |
|
| 31 |
|
| 32 |
class AirOSListenerError(AirOSDiscoveryError): |
| 33 |
"""Raised when the AirOS listener encounters an error.""" |
| 34 |
|
| 35 |
|
| 36 |
class AirOSEndpointError(AirOSDiscoveryError): |
| 37 |
"""Raised when there's an issue with the network endpoint.""" |
| 38 |
|
| 39 |
|
| 40 |
class AirOSNotSupportedError(AirOSException): |
| 41 |
"""Raised when method not available for device.""" |
| 42 |
|
| 43 |
|
| 44 |
class AirOSUrlNotFoundError(AirOSException): |
| 45 |
"""Raised when url not available for device.""" |
| 46 |
|
| 47 |
|
| 48 |
class AirOSMultipleMatchesFoundException(AirOSException): |
| 49 |
"""Raised when multiple devices found for lookup.""" |
| 50 |
|
| 51 |
|
| 52 |
class AirOSTLSCompatibilityError(AirOSDeviceConnectionError): |
| 53 |
"""The device requires legacy TLS/cipher compatibility.""" |