zeroclaw-labs/zeroclaw · error
URL cannot contain whitespace
Error message
URL cannot contain whitespace
What it means
Error "URL cannot contain whitespace" thrown in zeroclaw-labs/zeroclaw.
Source
Thrown at crates/zeroclaw-tools/src/web_fetch.rs:710
})
}
fn validate_target_url_with_dns_check(
raw_url: &str,
allowed_domains: &[String],
blocked_domains: &[String],
allowed_private_hosts: &[String],
tool_name: &str,
validate_dns: impl FnOnce(&str, bool) -> anyhow::Result<()>,
) -> anyhow::Result<String> {
let url = raw_url.trim();
if url.is_empty() {
anyhow::bail!("URL cannot be empty");
}
if url.chars().any(char::is_whitespace) {
anyhow::bail!("URL cannot contain whitespace");
}
if !url.starts_with("http://") && !url.starts_with("https://") {
anyhow::bail!("Only http:// and https:// URLs are allowed");
}
if allowed_domains.is_empty() {
anyhow::bail!(
"{tool_name} tool is enabled but no allowed_domains are configured. \
Add [{tool_name}].allowed_domains in config.toml"
);
}
let host = extract_host(url)?;
// blocked_domains always takes precedence
if domain_guard::host_matches_allowlist(&host, blocked_domains) {
anyhow::bail!("Host '{host}' is in {tool_name}.blocked_domains");View on GitHub (pinned to 88bb9c8533)
Solutions
- Remove whitespace from the URL.
When it happens
Trigger: Thrown at crates/zeroclaw-tools/src/web_fetch.rs:710 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/efac0836087bbed5.
Report an issue: GitHub.