From 6bbc1b431603e594be8ce8026ac496f5982e97be Mon Sep 17 00:00:00 2001 From: many Date: Thu, 4 Nov 2021 17:04:06 +0100 Subject: [PATCH] Remove error flattening in task serialization --- meilisearch-http/src/routes/mod.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/meilisearch-http/src/routes/mod.rs b/meilisearch-http/src/routes/mod.rs index 2c27b7b45..87504dcb9 100644 --- a/meilisearch-http/src/routes/mod.rs +++ b/meilisearch-http/src/routes/mod.rs @@ -97,8 +97,7 @@ pub struct FailedUpdateResult { pub update_id: u64, #[serde(rename = "type")] pub update_type: UpdateType, - #[serde(flatten)] - pub response: ResponseError, + pub error: ResponseError, pub duration: f64, // in seconds pub enqueued_at: DateTime, pub processed_at: DateTime, @@ -190,12 +189,12 @@ impl From for UpdateStatusResponse { let update_id = failed.id(); let processed_at = failed.failed_at; let enqueued_at = failed.from.from.enqueued_at; - let response = failed.into(); + let error = failed.into(); let content = FailedUpdateResult { update_id, update_type, - response, + error, duration, enqueued_at, processed_at,