from app.constants.http_status import HTTPStatus class APIException(Exception): def __init__(self, message, status_code=HTTPStatus.BAD_REQUEST, errors=None): self.message = message self.status_code = status_code self.errors = errors super().__init__(self.message)