Skip to content

Commit

Permalink
chore(event-handler): adjusts exception docstrings to not confuse App…
Browse files Browse the repository at this point in the history
…Sync customers
  • Loading branch information
heitorlessa committed Jul 6, 2021
1 parent 33f80fd commit a519cce
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions aws_lambda_powertools/event_handler/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


class ServiceError(Exception):
"""Service Error"""
"""API Gateway and ALB HTTP Service Error"""

def __init__(self, status_code: int, msg: str):
"""
Expand All @@ -18,28 +18,28 @@ def __init__(self, status_code: int, msg: str):


class BadRequestError(ServiceError):
"""Bad Request Error"""
"""API Gateway and ALB Bad Request Error (400)"""

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


class UnauthorizedError(ServiceError):
"""Unauthorized Error"""
"""API Gateway and ALB Unauthorized Error (401)"""

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


class NotFoundError(ServiceError):
"""Not Found Error"""
"""API Gateway and ALB Not Found Error (404)"""

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


class InternalServerError(ServiceError):
"""Internal Server Error"""
"""API Gateway and ALB Not Found Internal Server Error (500)"""

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

0 comments on commit a519cce

Please sign in to comment.