Source code for imednet.errors.export

"""Export-sink error types."""

from .base import ImednetError


[docs]class ExportError(ImednetError): """Raised when an export sink cannot write a batch or finalize a destination."""
[docs]class ExportConfigurationError(ExportError): """Raised when a sink is misconfigured (missing credentials, invalid parameters)."""
[docs]class ExportBatchError(ExportError): """Raised when a single batch write fails after all retries are exhausted."""
[docs] def __init__(self, message: str, *, batch_id: str) -> None: """Initialize an export batch error. Args: message: The error message. batch_id: The ID of the failed batch. """ super().__init__(message) self.batch_id = batch_id