You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415
  1. from werkzeug.exceptions import HTTPException
  2. class BaseHTTPException(HTTPException):
  3. error_code: str = "unknown"
  4. data: dict | None = None
  5. def __init__(self, description=None, response=None):
  6. super().__init__(description, response)
  7. self.data = {
  8. "code": self.error_code,
  9. "message": self.description,
  10. "status": self.code,
  11. }