Consistent error codes

This commit is contained in:
Louis Dureuil 2025-01-14 13:08:27 +01:00
parent cb8f033130
commit de6cd3ac01
No known key found for this signature in database
8 changed files with 51 additions and 26 deletions

View file

@ -222,7 +222,9 @@ and can not be more than 511 bytes.", .document_id.to_string()
#[error("Too many embedders in the configuration. Found {0}, but limited to 256.")]
TooManyEmbedders(usize),
#[error("Cannot find embedder with name `{0}`.")]
InvalidEmbedder(String),
InvalidSearchEmbedder(String),
#[error("Cannot find embedder with name `{0}`.")]
InvalidSimilarEmbedder(String),
#[error("Too many vectors for document with id {0}: found {1}, but limited to 256.")]
TooManyVectors(String, usize),
#[error("`.embedders.{embedder_name}`: Field `{field}` unavailable for source `{source_}` (only available for sources: {}). Available fields: {}",