zeroclaw-labs/zeroclaw · error

Invalid {field} URL scheme '{scheme}'. Allowed: http, https,

Error message

Invalid {field} URL scheme '{scheme}'. Allowed: http, https, socks5, socks5h, socks

What it means

Error "Invalid {field} URL scheme '{scheme}'. Allowed: http, https, socks5, socks5h, socks" thrown in zeroclaw-labs/zeroclaw.

Source

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

                        anyhow::bail!(
                            "mcp.servers[{i}].url must use https when tls_ca_cert_path is set"
                        );
                    }
                }
            }
        }
    }
    Ok(())
}

fn validate_proxy_url(field: &str, url: &str) -> Result<()> {
    let parsed = reqwest::Url::parse(url)
        .with_context(|| format!("Invalid {field} URL: '{url}' is not a valid URL"))?;

    match parsed.scheme() {
        "http" | "https" | "socks5" | "socks5h" | "socks" => {}
        scheme => {
            anyhow::bail!(
                "Invalid {field} URL scheme '{scheme}'. Allowed: http, https, socks5, socks5h, socks"
            );
        }
    }

    if parsed.host_str().is_none() {
        anyhow::bail!("Invalid {field} URL: host is required");
    }

    Ok(())
}

fn validate_http_base_url(field: &str, url: &str) -> Result<()> {
    if url.trim().is_empty() {
        validation_bail!(
            RequiredFieldEmpty,
            field.to_string(),
            "{field} must not be empty"

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. Use an allowed URL scheme (http, https, socks5, socks5h, socks) for the proxy field.

When it happens

Trigger: Thrown at crates/zeroclaw-config/src/schema.rs:10172 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/9a7c045c9b5541c7. Report an issue: GitHub.