#[non_exhaustive]pub enum RepoError {
Uninitialized,
Stale,
NoCommonAncestor,
NotFound,
AmbiguousMatch,
IndexCorrupt {
context: String,
cid: Cid,
},
VectorDimMismatch {
index_dim: u32,
query_dim: usize,
},
RetrievalEmpty,
}Expand description
Errors from crate::repo - repository lifecycle operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Uninitialized
open was called on an op-heads store with no heads. Call
crate::repo::ReadonlyRepo::init first.
Stale
A CAS or linearized operation observed state that no longer
matches the caller’s expectations (SPEC §6.4 / §6.5). Retry
against a fresh ReadonlyRepo.
NoCommonAncestor
Op-DAG is malformed - heads do not share any common ancestor. Cannot happen in a well-formed repository (all heads descend from the root op); indicates corruption or partial import.
NotFound
Query::one (or a similar precondition API) found zero matches.
AmbiguousMatch
Query::one (or a similar precondition API) found multiple
matches where exactly one was required.
IndexCorrupt
A secondary index pointed at a block that is missing, malformed, or whose contents contradict the index (wrong label, wrong prop value). Indicates corruption or a partial import; does not trigger on a simple “no such key” miss.
Fields
VectorDimMismatch
A vector-search query’s dimension did not match the index dimension. Each vector index binds to one model + dim at build time; agents must pass a query vector of the exact same shape.
Fields
RetrievalEmpty
A crate::retrieve::Retriever was executed without any
filters or rankers configured. Retrieval needs at least one
label / prop / text / vector input to produce a useful result.
audit-2026-04-25 P2-1 / P1-3: the error now spells out the common remediation path (text query needs an embedder) so CLI and MCP callers do not have to guess.
Trait Implementations§
Source§impl Error for RepoError
impl Error for RepoError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()