20 lines
544 B
Python
20 lines
544 B
Python
"""Custom exceptions for the application."""
|
|
|
|
|
|
class FirestorePersistenceError(Exception):
|
|
"""Exception raised when Firestore operations fail.
|
|
|
|
This is typically caught and logged without failing the request.
|
|
"""
|
|
|
|
def __init__(self, message: str, cause: Exception | None = None) -> None:
|
|
"""Initialize Firestore persistence exception.
|
|
|
|
Args:
|
|
message: Error message
|
|
cause: Original exception that caused this error
|
|
|
|
"""
|
|
super().__init__(message)
|
|
self.cause = cause
|