fix(http): use 504 Gateway Timeout for upstream timeouts (#16320)

This commit is contained in:
Chang Su
2026-01-02 16:01:44 -08:00
committed by GitHub
parent f66b091699
commit a2d4f58a96

View File

@@ -685,7 +685,7 @@ fn convert_reqwest_error(e: reqwest::Error) -> Response {
"call_upstream_decode_error",
)
} else if e.is_timeout() {
(StatusCode::INTERNAL_SERVER_ERROR, "call_upstream_timeout")
(StatusCode::GATEWAY_TIMEOUT, "call_upstream_timeout")
} else if e.is_connect() {
(
StatusCode::INTERNAL_SERVER_ERROR,