Skip to content
You are viewing the corvid 0.4.1 release snapshot — frozen at the 0.4.1 engine release.Current documentation

Error codes

generated — synced from the engine at v0.4.1. The detailed codes returned by corvid_last_error_code(). Value 0 means “no error recorded on this thread”. Codes 1–18 map 1:1 onto the engine’s corvid::Error variants (pinned by the variant-inventory snapshot test); code 19 is FFI-only. Never renumbered; new values only appended (20+). The error model itself: errors & NULL discipline.

CodeNameMeaning
0CORVID_E_OKno error
1CORVID_E_DATABASEcorvid::Error::Database — opening/creating the file failed
2CORVID_E_TRANSACTIONcorvid::Error::Transaction — beginning a read/write txn failed
3CORVID_E_TABLEcorvid::Error::Table — opening a storage table failed
4CORVID_E_STORAGEcorvid::Error::Storage — a storage read/write failed
5CORVID_E_COMMITcorvid::Error::Commit — committing a write txn failed
6CORVID_E_SET_DURABILITYcorvid::Error::SetDurability — changing txn durability failed
7CORVID_E_COMPACTIONcorvid::Error::Compaction — compacting the file failed
8CORVID_E_DECODEcorvid::Error::Decode — stored bytes are not a decodable Value
9CORVID_E_CORRUPT_INDEXcorvid::Error::CorruptIndex — persisted index state is corrupt
10CORVID_E_RESERVED_COLLECTIONcorvid::Error::ReservedCollection — name uses the __ prefix
11CORVID_E_INVALID_NAMEcorvid::Error::InvalidName — name has a NUL byte or interior __
12CORVID_E_ARGUMENTcorvid::Error::InvalidArgument — argument outside its domain (RRF k, MMR lambda, geo bounds) AND the FFI’s own NULL/UTF-8 discipline (§7)
13CORVID_E_INCOMPATIBLE_FORMATcorvid::Error::IncompatibleFormat — file is a foreign format version
14CORVID_E_EMPTY_INDEX_TRAININGcorvid::Error::EmptyIndexTraining — PQ create with no training vectors
15CORVID_E_SCHEMA_VIOLATIONcorvid::Error::SchemaViolation — write violates the declared schema
16CORVID_E_INVALID_DUMPcorvid::Error::InvalidDump — malformed / unknown-version dump stream
17CORVID_E_BACKUP_TARGET_EXISTScorvid::Error::BackupTargetExists — backup path already exists
18CORVID_E_IOcorvid::Error::Io — I/O error (dump/load paths, files)
19CORVID_E_BUSYFFI-ONLY: corvid_compact while derived handles are still open (engine Db::compact needs &mut self; see §4.13). No engine variant.

In Rust, the same failures surface as the typed corvid::Error enum (thiserror, #[non_exhaustive]); methods return corvid::Result<T>. Bindings map the code to native exceptions (corvid-node exports this table as ErrorCode).