Skip to content

Storage exceptions

Structured exception taxonomy for persistence & runtime layers.

These exceptions let higher-level orchestration decide retry / fail-fast logic instead of relying on broad except Exception blocks.

Classes:

Name Description
MetricsError

Raised when metrics emission fails (should normally be swallowed/logged).

SchemaVersionError

Raised when schema version detection or migration application fails.

SerializationError

Raised when (de)serialization of state/messages fails deterministically.

StorageError

Base class for non-retryable storage layer errors.

TransientStorageError

Retryable storage error (connection drops, timeouts).

Classes

MetricsError

Bases: Exception

Raised when metrics emission fails (should normally be swallowed/logged).

Source code in pyagenity/exceptions/storage_exceptions.py
26
27
class MetricsError(Exception):
    """Raised when metrics emission fails (should normally be swallowed/logged)."""

SchemaVersionError

Bases: StorageError

Raised when schema version detection or migration application fails.

Source code in pyagenity/exceptions/storage_exceptions.py
22
23
class SchemaVersionError(StorageError):
    """Raised when schema version detection or migration application fails."""

SerializationError

Bases: StorageError

Raised when (de)serialization of state/messages fails deterministically.

Source code in pyagenity/exceptions/storage_exceptions.py
18
19
class SerializationError(StorageError):
    """Raised when (de)serialization of state/messages fails deterministically."""

StorageError

Bases: Exception

Base class for non-retryable storage layer errors.

Source code in pyagenity/exceptions/storage_exceptions.py
10
11
class StorageError(Exception):
    """Base class for non-retryable storage layer errors."""

TransientStorageError

Bases: StorageError

Retryable storage error (connection drops, timeouts).

Source code in pyagenity/exceptions/storage_exceptions.py
14
15
class TransientStorageError(StorageError):
    """Retryable storage error (connection drops, timeouts)."""