Skip to content

Commit f198ace

Browse files
author
Michael Brewer
committed
refactor: rather use shorthand
1 parent 9a01514 commit f198ace

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: aws_lambda_powertools/event_handler/exceptions.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,25 @@ class BadRequestError(ServiceError):
2121
"""Bad Request Error"""
2222

2323
def __init__(self, msg: str):
24-
super().__init__(HTTPStatus.BAD_REQUEST.value, msg)
24+
super().__init__(HTTPStatus.BAD_REQUEST, msg)
2525

2626

2727
class UnauthorizedError(ServiceError):
2828
"""Unauthorized Error"""
2929

3030
def __init__(self, msg: str):
31-
super().__init__(HTTPStatus.UNAUTHORIZED.value, msg)
31+
super().__init__(HTTPStatus.UNAUTHORIZED, msg)
3232

3333

3434
class NotFoundError(ServiceError):
3535
"""Not Found Error"""
3636

3737
def __init__(self, msg: str = "Not found"):
38-
super().__init__(HTTPStatus.NOT_FOUND.value, msg)
38+
super().__init__(HTTPStatus.NOT_FOUND, msg)
3939

4040

4141
class InternalServerError(ServiceError):
4242
"""Internal Server Error"""
4343

4444
def __init__(self, message: str):
45-
super().__init__(HTTPStatus.INTERNAL_SERVER_ERROR.value, message)
45+
super().__init__(HTTPStatus.INTERNAL_SERVER_ERROR, message)

0 commit comments

Comments
 (0)