InvalidVectorsEmbedderConf error takes a String rather than a deserr error

This commit is contained in:
Louis Dureuil 2024-11-12 22:47:57 +01:00
parent 68bbf674c9
commit 8a6e61c77f
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -122,7 +122,7 @@ and can not be more than 512 bytes.", .document_id.to_string()
#[error("The `_vectors` field in the document with id: `{document_id}` is not an object. Was expecting an object with a key for each embedder with manually provided vectors, but instead got `{value}`")] #[error("The `_vectors` field in the document with id: `{document_id}` is not an object. Was expecting an object with a key for each embedder with manually provided vectors, but instead got `{value}`")]
InvalidVectorsMapType { document_id: String, value: Value }, InvalidVectorsMapType { document_id: String, value: Value },
#[error("Bad embedder configuration in the document with id: `{document_id}`. {error}")] #[error("Bad embedder configuration in the document with id: `{document_id}`. {error}")]
InvalidVectorsEmbedderConf { document_id: String, error: deserr::errors::JsonError }, InvalidVectorsEmbedderConf { document_id: String, error: String },
#[error("{0}")] #[error("{0}")]
InvalidFilter(String), InvalidFilter(String),
#[error("Invalid type for filter subexpression: expected: {}, found: {1}.", .0.join(", "))] #[error("Invalid type for filter subexpression: expected: {}, found: {1}.", .0.join(", "))]

View File

@ -343,7 +343,7 @@ impl Error {
Error::InvalidEmbedderConf { error } => { Error::InvalidEmbedderConf { error } => {
crate::Error::UserError(UserError::InvalidVectorsEmbedderConf { crate::Error::UserError(UserError::InvalidVectorsEmbedderConf {
document_id, document_id,
error, error: error.to_string(),
}) })
} }
Error::InternalSerdeJson(error) => { Error::InternalSerdeJson(error) => {