"""Custom exceptions module.""" class PermanentError(Exception): """Base class for permanent errors (non-retriable). Permanent errors represent failures that cannot be resolved by retrying the operation, such as validation errors, missing data, or logic errors. """ pass class FileUploadNotFoundError(PermanentError): """Raised when file_upload record is not found.""" pass class InvalidUploadStatusError(PermanentError): """Raised when file_upload status is not supported.""" pass class InvalidUploadTypeError(PermanentError): """Raised when file_upload type is not supported.""" pass class S3FileNotFoundError(PermanentError): """Raised when S3 object is not found.""" pass class StatementPeriodNotFoundError(PermanentError): """Raised when statement_period record is not found.""" pass class BatchStatementPeriodMismatchError(PermanentError): """Raised when existing batch belongs to a different statement period.""" pass class InvalidBatchStatusError(PermanentError): """Raised when batch status is not supported.""" pass class StatementPeriodAdjustmentFileCreateError(PermanentError): """Raised when cannot create adjustment file.""" pass class StatementPeriodAdjustmentFileStatesCreateError(PermanentError): """Raised when cannot create adjustment file states.""" pass class TransientError(Exception): """Retriable transient error (network, throttling, temporary failures). Transient errors represent temporary failures that may succeed if retried, such as network timeouts, database connection issues, or service throttling. """ pass