diff --git a/meilisearch-core/src/error.rs b/meilisearch-core/src/error.rs index bbb33526a..0540ca8d0 100644 --- a/meilisearch-core/src/error.rs +++ b/meilisearch-core/src/error.rs @@ -124,7 +124,10 @@ impl From for Error { impl From for Error { fn from(error: SerializerError) -> Error { - Error::Serializer(error) + match error { + SerializerError::DocumentIdNotFound => Error::MissingDocumentId, + e => Error::Serializer(e), + } } }