-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathpsnawp_exceptions.py
42 lines (22 loc) · 1.27 KB
/
psnawp_exceptions.py
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
class PSNAWPException(Exception):
"""Base Exception for all PSNAWP Exceptions."""
class PSNAWPServerError(PSNAWPException):
"""Exception raised if there is a problem at the server."""
class PSNAWPClientError(PSNAWPException):
"""Exception raised if there is a problem at the client."""
class PSNAWPAuthenticationError(PSNAWPClientError):
"""Exception for authentication related errors."""
class PSNAWPBadRequest(PSNAWPClientError):
"""Exception raised if bad request is made to the endpoint."""
class PSNAWPIllegalArgumentError(PSNAWPClientError):
"""Exception raised if user gave wrong input to a function."""
class PSNAWPUnauthorized(PSNAWPClientError):
"""Exception for accessing an action is not allowed due to missing the right authorization."""
class PSNAWPForbidden(PSNAWPClientError):
"""Exception for accessing an action is not allowed due to insufficient rights to a resource."""
class PSNAWPNotFound(PSNAWPClientError):
"""Exception raised if resource not found."""
class PSNAWPNotAllowed(PSNAWPClientError):
"""Exception raised if resource doesn't support this method."""
class PSNAWPTooManyRequests(PSNAWPClientError):
"""Exception raised if client sends too many requests."""