Debian Codegraph @

yolink/exception.py

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