forked from DevCycleHQ/python-server-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexceptions.py
More file actions
43 lines (27 loc) · 1.03 KB
/
Copy pathexceptions.py
File metadata and controls
43 lines (27 loc) · 1.03 KB
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
36
37
38
39
40
41
42
43
from typing import Optional
class APIClientError(Exception):
def __init__(self, message: str, cause: Optional[Exception] = None):
self.message = message
self.__cause__ = cause
def __str__(self):
return f"APIClientError: {self.message}"
class APIClientUnauthorizedError(Exception):
def __init__(self, message: str):
self.message = message
super().__init__(message)
class CloudClientError(APIClientError):
def __init__(self, message: str, cause: Optional[Exception] = None):
super().__init__(message, cause)
def __str__(self):
return f"CloudClientException: {self.message}"
class CloudClientUnauthorizedError(APIClientUnauthorizedError):
def __init__(self, message: str):
super().__init__(message)
class NotFoundError(Exception):
def __init__(self, key: str):
self.key = key
class VariableTypeMismatchError(Exception):
def __init__(self, message: str):
super().__init__(message)
class MalformedConfigError(Exception):
pass