karenina.replay.exceptions¶
exceptions
¶
Exception hierarchy for the replay layer.
Classes¶
ProjectionError
¶
Bases: ReplayError
Raised by ScenarioReplayBuilder.build(strict=True) when the projection report contains unmatched targets or duplicate targets.
Attributes:
| Name | Type | Description |
|---|---|---|
report |
The full ProjectionReport attached to the error for
post-mortem inspection. Typed |
Source code in src/karenina/replay/exceptions.py
ReplayError
¶
Bases: KareninaError
Base exception for the replay layer.
Source code in src/karenina/replay/exceptions.py
ReplayHydrationError
¶
Bases: ReplayError
Raised when parsed_answer_fields cannot be validated against the current Answer class.
Attributes:
| Name | Type | Description |
|---|---|---|
captured_fields |
The parsed field dict that failed validation. |
|
inner |
The underlying exception (typically ValidationError). |
Source code in src/karenina/replay/exceptions.py
ReplayMissError
¶
Bases: ReplayError
Raised in strict mode when no matching entry is found.
Attributes:
| Name | Type | Description |
|---|---|---|
key |
The ReplayKey that was looked up (Any to avoid a circular import with store.py). |
Source code in src/karenina/replay/exceptions.py
ReplayPersistenceError
¶
Bases: ReplayError
Raised on version mismatch, schema failure, or malformed replay JSON.