A multipurpose python flask API server and administration SPA
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.

20 lines
468 B

  1. """Error definitions for Corvus."""
  2. from typing import Dict
  3. class BaseError(RuntimeError):
  4. """Corvus Base Error Class."""
  5. def __init__(
  6. self,
  7. message: str = 'Unknown error',
  8. extra_fields: Dict[str, str] = None) -> None:
  9. """Populate The Error Definition."""
  10. super().__init__(message)
  11. self.extra_fields = extra_fields
  12. class ValidationError(BaseError):
  13. """Corvus Validation Error."""
  14. pass