Skip to content

Commit 3651cfb

Browse files
authored
[router] fix: validate HTTP status codes in health check (#12631)
1 parent c8547ec commit 3651cfb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sgl-router/src/core/workflow/steps/worker_registration.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ async fn try_http_health_check(
145145
.timeout(Duration::from_secs(timeout_secs))
146146
.send()
147147
.await
148+
.and_then(reqwest::Response::error_for_status)
148149
.map_err(|e| format!("Health check failed: {}", e))?;
149150

150151
Ok(())

0 commit comments

Comments
 (0)