synwire_core/error/vectorstore.rs
1//! Errors specific to vector store operations.
2
3/// Errors specific to vector store operations.
4#[derive(Debug, thiserror::Error)]
5#[non_exhaustive]
6pub enum VectorStoreError {
7 /// Document not found.
8 #[error("document not found: {id}")]
9 NotFound {
10 /// Document ID.
11 id: String,
12 },
13 /// Dimension mismatch when inserting.
14 #[error("dimension mismatch: expected {expected}, got {actual}")]
15 DimensionMismatch {
16 /// Expected dimensions.
17 expected: usize,
18 /// Actual dimensions.
19 actual: usize,
20 },
21 /// Other vector store error.
22 #[error("vector store error: {message}")]
23 Other {
24 /// Error message.
25 message: String,
26 },
27}