1+ class TknExpError (Exception ):
2+ """Raise exception when refresh or access token is expired.
3+
4+ Args:
5+ Exception (Exception): The base python exception class
6+ """
7+ def __init__ (self , message ):
8+ """Print out message for this exception.
9+
10+ Args:
11+ message (str): Pass in the message returned by the server.
12+ """
13+ self .message = message
14+ super ().__init__ (self .message )
15+
16+ class ExdLmtError (Exception ):
17+ """Raise exception when exceeding query limit of the server.
18+
19+ Args:
20+ Exception (Exception): The base python exception class
21+ """
22+ def __init__ (self , message ):
23+ """Print out message for this exception.
24+
25+ Args:
26+ message (str): Pass in the message returned by the server.
27+ """
28+ self .message = message
29+ super ().__init__ (self .message )
30+
31+ class NotNulError (Exception ):
32+ """Raise exception when a null value is passed into non-null field.
33+
34+ Args:
35+ Exception (Exception): The base python exception class
36+ """
37+ def __init__ (self , message ):
38+ """Print out message for this exception.
39+
40+ Args:
41+ message (str): Pass in the message returned by the server.
42+ """
43+ self .message = message
44+ super ().__init__ (self .message )
45+
46+ class ForbidError (Exception ):
47+ """Raise forbidden exception. This usually occurs when the app does
48+ not have access to the account.
49+
50+ Args:
51+ Exception (Exception): The base python exception class
52+ """
53+ def __init__ (self , message ):
54+ """Print out message for this exception.
55+
56+ Args:
57+ message (str): Pass in the message returned by the server.
58+ """
59+ self .message = message
60+ super ().__init__ (self .message )
61+
62+ class NotFndError (Exception ):
63+ """Raise exception when criteria is not found.
64+
65+ Args:
66+ Exception (Exception): The base python exception class
67+ """
68+ def __init__ (self , message ):
69+ """Print out message for this exception.
70+
71+ Args:
72+ message (str): Pass in the message returned by the server.
73+ """
74+ self .message = message
75+ super ().__init__ (self .message )
76+
77+ class ServerError (Exception ):
78+ """Raise exception when there is an error with the service or the server
79+ cannot provide response.
80+
81+ Args:
82+ Exception (Exception): The base python exception class
83+ """
84+ def __init__ (self , message ):
85+ """Print out message for this exception.
86+
87+ Args:
88+ message (str): Pass in the message returned by the server.
89+ """
90+ self .message = message
91+ super ().__init__ (self .message )
92+
93+ class GeneralError (Exception ):
94+ """Raise exception for all other status code >400 errors which are not
95+ defined above.
96+
97+ Args:
98+ Exception (Exception): The base python exception class
99+ """
100+ def __init__ (self , message ):
101+ """Print out message for this exception.
102+
103+ Args:
104+ message (str): Pass in the message returned by the server.
105+ """
106+ self .message = message
107+ super ().__init__ (self .message )
0 commit comments