fix(gateway): log the upstream error when forwarding returns 502

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Yujong Lee 2026-11-03 06:16:04 +09:00
parent e361f7acae
commit 7a581ae3f1

View file

@ -82,7 +82,10 @@ async fn forward(
.client
.request(request)
.await
.map_err(|_| StatusCode::BAD_GATEWAY)?;
.map_err(|error| {
tracing::warn!(%error, "python proxy unreachable");
StatusCode::BAD_GATEWAY
})?;
strip_hop_headers(response.headers_mut());
Ok(response.map(Body::new))
}