From 574d09bcd779fefc1a40605510d3760f8e6736c0 Mon Sep 17 00:00:00 2001 From: Theo Butler Date: Fri, 2 Feb 2024 11:20:31 -0500 Subject: [PATCH] fix: truncate indexer errors before processing --- graph-gateway/src/client_query.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/graph-gateway/src/client_query.rs b/graph-gateway/src/client_query.rs index d2adc2ce..56b9712e 100644 --- a/graph-gateway/src/client_query.rs +++ b/graph-gateway/src/client_query.rs @@ -641,7 +641,11 @@ async fn handle_indexer_query_inner( .map_err(|err| IndexerError::BadResponse(err.to_string()))? .errors .into_iter() - .map(|err| err.message) + .map(|mut err| { + err.message.truncate(512); + err.message.shrink_to_fit(); + err.message + }) .collect::>(); tracing::info!(