[router] fix: validate HTTP status codes in health check (#12631)

This commit is contained in:
wyx
2025-11-06 05:37:17 +08:00
committed by GitHub
parent c8547ecddd
commit 3651cfbf62

View File

@@ -145,6 +145,7 @@ async fn try_http_health_check(
.timeout(Duration::from_secs(timeout_secs))
.send()
.await
.and_then(reqwest::Response::error_for_status)
.map_err(|e| format!("Health check failed: {}", e))?;
Ok(())