{"record":{"id":"b5293d95d88e6977","repo":"zeroclaw-labs/zeroclaw","slug":"host-host-is-not-in-tool-name-allowed-domain","errorCode":null,"errorMessage":"Host '{host}' is not in {tool_name}.allowed_domains","messagePattern":"Host '(.+?)' is not in (.+?)\\.allowed_domains","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-tools/src/web_fetch.rs","lineNumber":762,"sourceCode":"             To allow this host, add it (or \\\"*\\\") to \\\n             {tool_name}.allowed_private_hosts in config.toml\"\n        );\n    }\n\n    if private_explicit || (private_tolerated && host_is_private_or_local) {\n        ::zeroclaw_log::record!(\n            WARN,\n            ::zeroclaw_log::Event::new(module_path!(), ::zeroclaw_log::Action::Note)\n                .with_outcome(::zeroclaw_log::EventOutcome::Unknown)\n                .with_attrs(::serde_json::json!({\"tool_name\": tool_name, \"host\": host})),\n            \"web_fetch: allowing host via allowed_private_hosts\"\n        );\n    }\n\n    let skip_allowed_domains = host_is_private_or_local && private_tolerated;\n\n    if !skip_allowed_domains && !domain_guard::host_matches_allowlist(&host, allowed_domains) {\n        anyhow::bail!(\"Host '{host}' is not in {tool_name}.allowed_domains\");\n    }\n\n    // Private opt-in relaxes only the public-address requirement. DNS still\n    // resolves and the metadata exclusion remains unconditional.\n    validate_dns(&host, private_tolerated)?;\n\n    Ok(url.to_string())\n}\n\nfn append_chunk_with_cap(buffer: &mut Vec<u8>, chunk: &[u8], hard_cap: usize) -> bool {\n    if buffer.len() >= hard_cap {\n        return true;\n    }\n\n    let remaining = hard_cap - buffer.len();\n    if chunk.len() > remaining {\n        buffer.extend_from_slice(&chunk[..remaining]);\n        return true;","sourceCodeStart":744,"sourceCodeEnd":780,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-tools/src/web_fetch.rs#L744-L780","documentation":"Error \"Host '{host}' is not in {tool_name}.allowed_domains\" thrown in zeroclaw-labs/zeroclaw.","triggerScenarios":"Thrown at crates/zeroclaw-tools/src/web_fetch.rs:762 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add the host to the tool's allowed_domains list in the configuration, e.g. `zeroclaw config set tools.web_fetch.allowed_domains '[\"example.com\"]'`.","Remove the allowed_domains restriction only if you trust arbitrary fetches, or fetch the URL through an already-allowed proxy host."],"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"}