|
1 | 1 | class BaseOverkizException(Exception): |
2 | | - pass |
| 2 | + """Base exception for Overkiz errors.""" |
3 | 3 |
|
4 | 4 |
|
5 | 5 | class OverkizException(BaseOverkizException): |
6 | | - pass |
| 6 | + """Raised when an undefined error occurs while communicating with the Overkiz API.""" |
7 | 7 |
|
8 | 8 |
|
9 | 9 | class BadCredentialsException(BaseOverkizException): |
10 | | - pass |
| 10 | + """Raised when invalid credentials are provided.""" |
11 | 11 |
|
12 | 12 |
|
13 | 13 | class InvalidCommandException(BaseOverkizException): |
14 | | - pass |
| 14 | + """Raised when an invalid command is provided.""" |
| 15 | + |
| 16 | + |
| 17 | +class NoSuchResourceException(BaseOverkizException): |
| 18 | + """Raised when an invalid API call is made.""" |
15 | 19 |
|
16 | 20 |
|
17 | 21 | class NotAuthenticatedException(BaseOverkizException): |
18 | | - pass |
| 22 | + """Raised when the user is not authenticated.""" |
19 | 23 |
|
20 | 24 |
|
21 | 25 | class TooManyExecutionsException(BaseOverkizException): |
22 | | - pass |
| 26 | + """Raised when too many executions are requested.""" |
23 | 27 |
|
24 | 28 |
|
25 | 29 | class ExecutionQueueFullException(BaseOverkizException): |
26 | | - pass |
| 30 | + """Raised when the execution queue is full.""" |
27 | 31 |
|
28 | 32 |
|
29 | 33 | class TooManyRequestsException(BaseOverkizException): |
30 | | - pass |
| 34 | + """Raised when too many requests are made.""" |
31 | 35 |
|
32 | 36 |
|
33 | 37 | class TooManyConcurrentRequestsException(BaseOverkizException): |
34 | | - pass |
| 38 | + """Raised when too many concurrent requests are made.""" |
35 | 39 |
|
36 | 40 |
|
37 | 41 | class ServiceUnavailableException(BaseOverkizException): |
38 | | - pass |
| 42 | + """Raised when the service is unavailable.""" |
39 | 43 |
|
40 | 44 |
|
41 | 45 | class MaintenanceException(ServiceUnavailableException): |
42 | | - pass |
| 46 | + """Raised when the service is under maintenance.""" |
43 | 47 |
|
44 | 48 |
|
45 | 49 | class MissingAuthorizationTokenException(BaseOverkizException): |
46 | | - pass |
| 50 | + """Raised when the authorization token is missing.""" |
47 | 51 |
|
48 | 52 |
|
49 | 53 | class InvalidEventListenerIdException(BaseOverkizException): |
50 | | - pass |
| 54 | + """Raised when an invalid event listener ID is provided.""" |
51 | 55 |
|
52 | 56 |
|
53 | 57 | class NoRegisteredEventListenerException(BaseOverkizException): |
54 | | - pass |
| 58 | + """Raised when no event listener is registered.""" |
55 | 59 |
|
56 | 60 |
|
57 | 61 | class SessionAndBearerInSameRequestException(BaseOverkizException): |
58 | | - pass |
| 62 | + """Raised when both session and bearer are provided in the same request.""" |
59 | 63 |
|
60 | 64 |
|
61 | 65 | class TooManyAttemptsBannedException(BaseOverkizException): |
62 | | - pass |
| 66 | + """Raised when too many attempts are made and the user is (temporarily) banned.""" |
63 | 67 |
|
64 | 68 |
|
65 | 69 | class InvalidTokenException(BaseOverkizException): |
66 | | - pass |
| 70 | + """Raised when an invalid token is provided.""" |
67 | 71 |
|
68 | 72 |
|
69 | 73 | class NotSuchTokenException(BaseOverkizException): |
70 | | - pass |
| 74 | + """Raised when an invalid token is provided.""" |
71 | 75 |
|
72 | 76 |
|
73 | 77 | class UnknownUserException(BaseOverkizException): |
74 | | - pass |
| 78 | + """Raised when an unknown user is provided.""" |
75 | 79 |
|
76 | 80 |
|
77 | 81 | class UnknownObjectException(BaseOverkizException): |
78 | | - pass |
| 82 | + """Raised when an unknown object is provided.""" |
79 | 83 |
|
80 | 84 |
|
81 | 85 | class AccessDeniedToGatewayException(BaseOverkizException): |
82 | | - pass |
| 86 | + """Raised when access is denied to the gateway. This often happens when the user is not the owner of the gateway.""" |
83 | 87 |
|
84 | 88 |
|
85 | 89 | # Nexity |
86 | 90 | class NexityBadCredentialsException(BadCredentialsException): |
87 | | - pass |
| 91 | + """Raised when invalid credentials are provided to Nexity authentication API.""" |
88 | 92 |
|
89 | 93 |
|
90 | 94 | class NexityServiceException(BaseOverkizException): |
91 | | - pass |
| 95 | + """Raised when an error occurs while communicating with the Nexity API.""" |
92 | 96 |
|
93 | 97 |
|
94 | 98 | # CozyTouch |
95 | 99 | class CozyTouchBadCredentialsException(BadCredentialsException): |
96 | | - pass |
| 100 | + """Raised when invalid credentials are provided to CozyTouch authentication API.""" |
97 | 101 |
|
98 | 102 |
|
99 | 103 | class CozyTouchServiceException(BaseOverkizException): |
100 | | - pass |
| 104 | + """Raised when an error occurs while communicating with the CozyTouch API.""" |
101 | 105 |
|
102 | 106 |
|
103 | 107 | # Somfy |
104 | 108 | class SomfyBadCredentialsException(BadCredentialsException): |
105 | | - pass |
| 109 | + """Raised when invalid credentials are provided to Somfy authentication API.""" |
106 | 110 |
|
107 | 111 |
|
108 | 112 | class SomfyServiceException(BaseOverkizException): |
109 | | - pass |
| 113 | + """Raised when an error occurs while communicating with the Somfy API.""" |
0 commit comments