1use thiserror::Error;
2
3#[derive(Debug, Error)]
5pub enum VectorError {
6 #[error("dimension mismatch: index expects {expected}, got {got}")]
7 DimensionMismatch { expected: usize, got: usize },
8
9 #[error(
10 "vector index already configured ({existing}); cannot change to {requested} while vectors exist, use reindex_vector_index to rebuild under the new configuration"
11 )]
12 AlreadyConfigured { existing: String, requested: String },
13
14 #[error("usearch library fault: {0}")]
15 IndexFault(String),
16
17 #[error("invalid vector configuration: {0}")]
18 InvalidConfig(String),
19
20 #[error("underlying storage error: {0}")]
21 Storage(#[from] issundb_core::Error),
22}