zeroclaw-labs/zeroclaw · error
Invalid URL scheme ' '. Allowed: http, https, socks5…
Error message
Invalid {field} URL scheme '{scheme}'. Allowed: http, https, socks5, socks5h, socks What it means
Validation guard in validate_proxy_url: the proxy URL (for example channel.lark proxy_url feeding build_channel_proxy_client) parsed successfully but its scheme is outside the allowed set http, https, socks5, socks5h, socks. The {field} placeholder names the config field holding the offending URL so the operator can locate it.
Solutions
- Use an allowed URL scheme (http, https, socks5, socks5h, socks) for the proxy field.
Defensive patterns
Strategy: validation
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.
Appendix: 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)