2
2
3
3
4
4
class ServiceError (Exception ):
5
- """Service Error"""
5
+ """API Gateway and ALB HTTP Service Error"""
6
6
7
7
def __init__ (self , status_code : int , msg : str ):
8
8
"""
@@ -18,28 +18,28 @@ def __init__(self, status_code: int, msg: str):
18
18
19
19
20
20
class BadRequestError (ServiceError ):
21
- """Bad Request Error"""
21
+ """API Gateway and ALB 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
- """Unauthorized Error"""
28
+ """API Gateway and ALB 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 NotFoundError (ServiceError ):
35
- """Not Found Error"""
35
+ """API Gateway and ALB Not Found Error (404) """
36
36
37
37
def __init__ (self , msg : str = "Not found" ):
38
38
super ().__init__ (HTTPStatus .NOT_FOUND , msg )
39
39
40
40
41
41
class InternalServerError (ServiceError ):
42
- """Internal Server Error"""
42
+ """API Gateway and ALB Not Found Internal Server Error (500) """
43
43
44
44
def __init__ (self , message : str ):
45
45
super ().__init__ (HTTPStatus .INTERNAL_SERVER_ERROR , message )
0 commit comments