Skip to content

Commit 8bb65cc

Browse files
committed
fix: log empty gateway login response headers and handle accordingly
1 parent c83dfa8 commit 8bb65cc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/gpapi/src/gateway/login.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ pub async fn gateway_login(gateway: &str, cred: &Credential, gp_params: &GpParam
4343
anyhow::anyhow!("Gateway login error: {}", err.reason)
4444
})?;
4545

46+
// It's possible to get an empty response, log the response headers for debugging
47+
if res.trim().is_empty() {
48+
debug!("Empty gateway login response headers: {:?}", res);
49+
bail!("Got empty gateway login response");
50+
}
51+
4652
// MFA detected
4753
if res.contains("Challenge") {
4854
let Some((message, input_str)) = parse_mfa(&res) else {

0 commit comments

Comments
 (0)