Improve errors when indexing documents with a user provided embedder

This commit is contained in:
Louis Dureuil 2024-07-16 10:20:20 +02:00
parent f4c94ac57f
commit 24240934f9
No known key found for this signature in database
7 changed files with 185 additions and 23 deletions

View file

@ -415,7 +415,9 @@ impl ErrorCode for milli::Error {
Code::InvalidSettingsTypoTolerance
}
UserError::InvalidEmbedder(_) => Code::InvalidEmbedder,
UserError::VectorEmbeddingError(_) => Code::VectorEmbeddingError,
UserError::VectorEmbeddingError(_) | UserError::DocumentEmbeddingError(_) => {
Code::VectorEmbeddingError
}
UserError::DocumentEditionCannotModifyPrimaryKey
| UserError::DocumentEditionDocumentMustBeObject
| UserError::DocumentEditionRuntimeError(_)