forked from datadesk/p2p-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.py
More file actions
51 lines (31 loc) · 808 Bytes
/
errors.py
File metadata and controls
51 lines (31 loc) · 808 Bytes
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
44
45
46
47
48
49
50
51
class P2PException(Exception):
pass
class P2PSlugTaken(P2PException):
pass
class P2PNotFound(P2PException):
pass
class P2PUniqueConstraintViolated(P2PException):
pass
class P2PEncodingMismatch(P2PException):
pass
class P2PUnknownAttribute(P2PException):
pass
class P2PInvalidAccessDefinition(P2PException):
pass
class P2PSearchError(P2PException):
pass
class P2PRetryableError(P2PException):
"""
A base exception for errors we want to retry when they fail.
"""
pass
class P2PForbidden(P2PRetryableError):
"""
To be raised when you credentials are refused due to a throttle.
"""
pass
class P2PTimeoutError(P2PRetryableError):
"""
To be raised when P2P throws a 500 error due to a timeout on its end.
"""
pass