Box the large GeoError error variant

This commit is contained in:
Clément Renault 2025-04-01 11:26:17 +02:00
parent 4d90e3d2ec
commit 64477aac60
No known key found for this signature in database
GPG key ID: F250A4C4E3AE5F5F
5 changed files with 45 additions and 24 deletions

View file

@ -151,7 +151,7 @@ and can not be more than 511 bytes.", .document_id.to_string()
matching_rule_indices: HashMap<String, usize>,
},
#[error(transparent)]
InvalidGeoField(#[from] GeoError),
InvalidGeoField(#[from] Box<GeoError>),
#[error("Invalid vector dimensions: expected: `{}`, found: `{}`.", .expected, .found)]
InvalidVectorDimensions { expected: usize, found: usize },
#[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}`")]
@ -519,7 +519,7 @@ error_from_sub_error! {
str::Utf8Error => InternalError,
ThreadPoolBuildError => InternalError,
SerializationError => InternalError,
GeoError => UserError,
Box<GeoError> => UserError,
CriterionError => UserError,
}