Docs / Reference
Errors
The ItzmaError variants a caller usually handles, and when each happens.
Rust
Every fallible call returns itzma_core::Result<T> with ItzmaError, which is #[non_exhaustive]. The library does not panic on bad input. The ones a caller usually handles:
| Variant | When |
|---|---|
NamespaceExists, NamespaceNotFound | create on a taken id, open on a missing one |
DimensionMismatch, InvalidVector | a vector of the wrong length, non-finite, or zero under cosine |
UnknownAttr, AttrTypeMismatch, InvalidAttrs | attributes or a predicate that do not fit the schema |
InvalidQuery, InvalidId, InvalidKey, InvalidColumns, InvalidConfig | bad arguments, refused before any storage call |
BatchTooLarge | a batch over 64 MiB |
WriteContention, ManifestContention | 32 lost races in a row; nothing was written |
KeyConflict | a keyed retry found its key on a different batch |
ReadBudgetExceeded | a read past the handle’s budget |
WalFormatTooNew, SegmentFormatTooNew | the namespace is at a level this build does not read; upgrade the build |
WalFormatTooOld, SegmentFormatTooOld | the call needs a higher level; run the matching upgrade_* |
CorruptWal, CorruptSegment, CorruptIndex, CorruptSparseIndex, CorruptManifest | an object is damaged or does not match; a query never falls back to a flat scan over a damaged index |
ManifestExists, Unrecoverable | from recover |
Storage | the backend failed |
Python
Python raises subclasses of itzma.ItzmaError, grouped more coarsely (InvalidInput, Contention, Corrupt and so on); Python API lists them.
