From 2a9f4c30c966613089c009b7fe56eda81c6a15d5 Mon Sep 17 00:00:00 2001 From: filou Date: Fri, 20 Dec 2024 22:58:45 +0100 Subject: [PATCH] cleaner --- core/src/search_stores/search_store.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/core/src/search_stores/search_store.rs b/core/src/search_stores/search_store.rs index 7ee98b491d11..abac1c8295c7 100644 --- a/core/src/search_stores/search_store.rs +++ b/core/src/search_stores/search_store.rs @@ -138,10 +138,7 @@ impl SearchStore for ElasticsearchSearchStore { } false => { let error = response.json::().await?; - Err(anyhow::anyhow!( - "Failed to search nodes: {}", - serde_json::to_string_pretty(&error)? - )) + Err(anyhow::anyhow!("Failed to search nodes: {}", error)) } } } @@ -170,7 +167,7 @@ impl SearchStore for ElasticsearchSearchStore { false => { let error = response.json::().await?; error!( - error = serde_json::to_string_pretty(&error)?, + error = %error, duration = utils::now() - now, globally_unique_id = node.unique_id(), "[ElasticsearchSearchStore] Failed to index {}", @@ -191,7 +188,7 @@ impl SearchStore for ElasticsearchSearchStore { if !response.status_code().is_success() { let error = response.json::().await?; error!( - error = serde_json::to_string_pretty(&error)?, + error = %error, globally_unique_id = node.unique_id(), "[ElasticsearchSearchStore] Failed to delete {}", node.node_type.to_string() @@ -215,7 +212,7 @@ impl SearchStore for ElasticsearchSearchStore { if !response.status_code().is_success() { let error = response.json::().await?; error!( - error = serde_json::to_string_pretty(&error)?, + error = %error, data_source_id = data_source_id, "[ElasticsearchSearchStore] Failed to delete data source nodes" );