Skip to content

Commit

Permalink
fix: truncate indexer errors before processing
Browse files Browse the repository at this point in the history
  • Loading branch information
Theodus committed Feb 2, 2024
1 parent b3ce887 commit 574d09b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion graph-gateway/src/client_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<Vec<String>>();

tracing::info!(
Expand Down

0 comments on commit 574d09b

Please sign in to comment.