Skip to content

Commit

Permalink
refactor: rather use shorthand
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Brewer committed Jul 6, 2021
1 parent 9a01514 commit f198ace
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions aws_lambda_powertools/event_handler/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,25 @@ class BadRequestError(ServiceError):
"""Bad Request Error"""

def __init__(self, msg: str):
super().__init__(HTTPStatus.BAD_REQUEST.value, msg)
super().__init__(HTTPStatus.BAD_REQUEST, msg)


class UnauthorizedError(ServiceError):
"""Unauthorized Error"""

def __init__(self, msg: str):
super().__init__(HTTPStatus.UNAUTHORIZED.value, msg)
super().__init__(HTTPStatus.UNAUTHORIZED, msg)


class NotFoundError(ServiceError):
"""Not Found Error"""

def __init__(self, msg: str = "Not found"):
super().__init__(HTTPStatus.NOT_FOUND.value, msg)
super().__init__(HTTPStatus.NOT_FOUND, msg)


class InternalServerError(ServiceError):
"""Internal Server Error"""

def __init__(self, message: str):
super().__init__(HTTPStatus.INTERNAL_SERVER_ERROR.value, message)
super().__init__(HTTPStatus.INTERNAL_SERVER_ERROR, message)

0 comments on commit f198ace

Please sign in to comment.