Add existing errors as UserError as they will now be triggered inside of the task

This commit is contained in:
Louis Dureuil
2025-09-23 16:37:59 +02:00
parent 0703767fc6
commit 58b8630862
2 changed files with 6 additions and 0 deletions

View File

@@ -529,6 +529,8 @@ impl ErrorCode for milli::Error {
| UserError::DocumentEditionCompilationError(_) => {
Code::EditDocumentsByFunctionError
}
UserError::NetworkShardingWithoutSelf => Code::InvalidNetworkSharding,
UserError::NetworkMissingUrl(_) => Code::MissingNetworkUrl,
UserError::CelluliteError(err) => match err {
cellulite::Error::BuildCanceled
| cellulite::Error::VersionMismatchOnBuild(_)

View File

@@ -432,6 +432,10 @@ and can not be more than 511 bytes.", .document_id.to_string()
InvalidChatSettingsDocumentTemplateMaxBytes,
#[error("{0}")]
DocumentEmbeddingError(String),
#[error("enabling the sharding requires `.self` to be set\n - Hint: Disable `sharding` or set `self` to a value.")]
NetworkShardingWithoutSelf,
#[error("Field `.remotes.{0}.url` cannot be set to `null`")]
NetworkMissingUrl(String),
}
impl From<crate::vector::Error> for Error {