exception.py 633 B

1234567891011121314151617181920212223
  1. class NoValidDatabaseException(Exception):
  2. pass
  3. class UnhealthyDatabaseException(Exception):
  4. """Exception raised when a database is unhealthy due to an underlying exception."""
  5. def __init__(self, message, database, original_exception):
  6. super().__init__(message)
  7. self.database = database
  8. self.original_exception = original_exception
  9. class TemporaryUnavailableException(Exception):
  10. """Exception raised when all databases in setup are temporary unavailable."""
  11. pass
  12. class InitialHealthCheckFailedError(Exception):
  13. """Exception raised when initial health check fails."""
  14. pass