{"record":{"id":"99b0910bb4af6cd8","repo":"zeroclaw-labs/zeroclaw","slug":"url-must-include-a-valid-host-99b091","errorCode":null,"errorMessage":"URL must include a valid host","messagePattern":"URL must include a valid host","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-tools/src/web_fetch.rs","lineNumber":826,"sourceCode":"    }\n\n    if !parsed.username().is_empty() || parsed.password().is_some() {\n        anyhow::bail!(\"URL userinfo is not allowed\");\n    }\n\n    let host = parsed\n        .host_str()\n        .ok_or_else(|| anyhow::Error::msg(\"URL must include a host\"))?;\n    // `Url::host_str()` serializes IPv6 literals with brackets, so parsing the\n    // returned string directly would never recognize them.\n    if host.starts_with('[') {\n        anyhow::bail!(\"IPv6 hosts are not supported in web_fetch\");\n    }\n\n    let host = host.trim_end_matches('.').to_ascii_lowercase();\n\n    if host.is_empty() {\n        anyhow::bail!(\"URL must include a valid host\");\n    }\n\n    Ok(host)\n}\n\n#[derive(Debug, Clone, Copy, PartialEq, Eq)]\nenum PrivateAllow {\n    /// Not covered by the private allowlist.\n    None,\n    /// Covered only by a `*` wildcard entry.\n    Wildcard,\n    /// Covered by a specific host/IP or suffix entry.\n    Explicit,\n}\n\nfn private_allowlist_match(host: &str, allowed_private_hosts: &[String]) -> PrivateAllow {\n    let mut wildcard = false;\n    for entry in allowed_private_hosts {","sourceCodeStart":808,"sourceCodeEnd":844,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-tools/src/web_fetch.rs#L808-L844","documentation":"Error \"URL must include a valid host\" thrown in zeroclaw-labs/zeroclaw.","triggerScenarios":"Thrown at crates/zeroclaw-tools/src/web_fetch.rs:826 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a fully-qualified URL including scheme and host, e.g. https://example.com/path.","Check for typos or missing `//` after the scheme in the URL."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}