2
2
3
3
4
4
class ServiceError (Exception ):
5
- """API Gateway and ALB HTTP Service Error"""
5
+ """Powertools class HTTP Service Error"""
6
6
7
7
def __init__ (self , status_code : int , msg : str ):
8
8
"""
@@ -18,56 +18,56 @@ def __init__(self, status_code: int, msg: str):
18
18
19
19
20
20
class BadRequestError (ServiceError ):
21
- """API Gateway and ALB Bad Request Error (400)"""
21
+ """Powertools class Bad Request Error (400)"""
22
22
23
23
def __init__ (self , msg : str ):
24
24
super ().__init__ (HTTPStatus .BAD_REQUEST , msg )
25
25
26
26
27
27
class UnauthorizedError (ServiceError ):
28
- """API Gateway and ALB Unauthorized Error (401)"""
28
+ """Powertools class Unauthorized Error (401)"""
29
29
30
30
def __init__ (self , msg : str ):
31
31
super ().__init__ (HTTPStatus .UNAUTHORIZED , msg )
32
32
33
33
34
34
class ForbiddenError (ServiceError ):
35
- """API Gateway and ALB Forbidden Error (403)"""
35
+ """Powertools class Forbidden Error (403)"""
36
36
37
37
def __init__ (self , msg : str ):
38
38
super ().__init__ (HTTPStatus .FORBIDDEN , msg )
39
39
40
40
41
41
class NotFoundError (ServiceError ):
42
- """API Gateway and ALB Not Found Error (404)"""
42
+ """Powertools class Not Found Error (404)"""
43
43
44
44
def __init__ (self , msg : str = "Not found" ):
45
45
super ().__init__ (HTTPStatus .NOT_FOUND , msg )
46
46
47
47
48
48
class RequestTimeoutError (ServiceError ):
49
- """API Gateway and ALB Request Timeout Error (408)"""
49
+ """Powertools class Request Timeout Error (408)"""
50
50
51
51
def __init__ (self , msg : str ):
52
52
super ().__init__ (HTTPStatus .REQUEST_TIMEOUT , msg )
53
53
54
54
55
55
class RequestEntityTooLargeError (ServiceError ):
56
- """API Gateway and ALB Request Entity Too Large Error (413)"""
56
+ """Powertools class Request Entity Too Large Error (413)"""
57
57
58
58
def __init__ (self , msg : str ):
59
59
super ().__init__ (HTTPStatus .REQUEST_ENTITY_TOO_LARGE , msg )
60
60
61
61
62
62
class InternalServerError (ServiceError ):
63
- """API Gateway and ALB Internal Server Error (500)"""
63
+ """Powertools class Internal Server Error (500)"""
64
64
65
65
def __init__ (self , message : str ):
66
66
super ().__init__ (HTTPStatus .INTERNAL_SERVER_ERROR , message )
67
67
68
68
69
69
class ServiceUnavailableError (ServiceError ):
70
- """API Gateway and ALB Service Unavailable Error (503)"""
70
+ """Powertools class Service Unavailable Error (503)"""
71
71
72
72
def __init__ (self , msg : str ):
73
73
super ().__init__ (HTTPStatus .SERVICE_UNAVAILABLE , msg )
0 commit comments