1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
"""YoLink Client Error."""
class YoLinkError(Exception):
"""YoLink Error."""
class YoLinkClientError(YoLinkError):
"""YoLink Client Error.
code: Error Code
desc: Desc or Error
"""
def __init__(
self,
code: str,
desc: str,
) -> None:
"""Initialize the yolink api error."""
self.code = code
self.message = desc
class YoLinkAuthFailError(YoLinkClientError):
"""YoLink Auth Fail"""
class YoLinkDeviceConnectionFailed(YoLinkClientError):
"""YoLink device connection failed."""
class YoLinkUnSupportedMethodError(YoLinkClientError):
"""YoLink Unsupported method error."""
|