zeroclaw-labs/zeroclaw · error

HTTP CONNECT proxy returned non-200 response: {status_line}

Error message

HTTP CONNECT proxy returned non-200 response: {status_line}

What it means

Error "HTTP CONNECT proxy returned non-200 response: {status_line}" thrown in zeroclaw-labs/zeroclaw.

Source

Thrown at crates/zeroclaw-config/src/schema.rs:10967

            // Read the response (we only need the status line).
            let mut buf = vec![0u8; 4096];
            let mut total = 0usize;
            loop {
                let n = tcp.read(&mut buf[total..]).await?;
                if n == 0 {
                    anyhow::bail!("HTTP CONNECT proxy closed connection before response");
                }
                total += n;
                // Look for end of HTTP headers.
                if let Some(pos) = find_header_end(&buf[..total]) {
                    let status_line = std::str::from_utf8(&buf[..pos])
                        .unwrap_or("")
                        .lines()
                        .next()
                        .unwrap_or("");
                    if !status_line.contains("200") {
                        anyhow::bail!(
                            "HTTP CONNECT proxy returned non-200 response: {status_line}"
                        );
                    }
                    break;
                }
                if total >= buf.len() {
                    anyhow::bail!("HTTP CONNECT proxy response too large");
                }
            }

            BoxedIo(Box::new(tcp))
        }
        scheme => {
            anyhow::bail!("Unsupported proxy scheme '{scheme}' for WebSocket connections");
        }
    };

    // If the target is wss://, wrap in TLS.

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. Check the proxy response status line; verify CONNECT target and proxy authentication credentials.

When it happens

Trigger: Thrown at crates/zeroclaw-config/src/schema.rs:10967 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/462024e9a0293aa3. Report an issue: GitHub.