From ef4375d3e80d3d8943ae93aec9f9cdc578881113 Mon Sep 17 00:00:00 2001 From: Yiming Luo Date: Fri, 17 Oct 2025 20:11:18 -0400 Subject: [PATCH] chore: Improve trace agent error message --- bottlecap/src/traces/trace_agent.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/bottlecap/src/traces/trace_agent.rs b/bottlecap/src/traces/trace_agent.rs index 1cc0c0265..03500894a 100644 --- a/bottlecap/src/traces/trace_agent.rs +++ b/bottlecap/src/traces/trace_agent.rs @@ -433,7 +433,12 @@ impl TraceAgent { ) -> Response { let (parts, body) = match extract_request_body(request).await { Ok(r) => r, - Err(e) => return error_response(StatusCode::INTERNAL_SERVER_ERROR, e), + Err(e) => { + return error_response( + StatusCode::INTERNAL_SERVER_ERROR, + format!("TRACE_AGENT | handle_traces | Error extracting request body: {e}"), + ); + } }; if let Some(content_length) = parts @@ -551,7 +556,12 @@ impl TraceAgent { debug!("TRACE_AGENT | Proxied request for {context}"); let (parts, body) = match extract_request_body(request).await { Ok(r) => r, - Err(e) => return error_response(StatusCode::INTERNAL_SERVER_ERROR, e), + Err(e) => { + return error_response( + StatusCode::INTERNAL_SERVER_ERROR, + format!("TRACE_AGENT | handle_proxy | Error extracting request body: {e}"), + ); + } }; let target_url = format!("https://{}.{}{}", backend_domain, config.site, backend_path);