{"record":{"id":"06407d0b1f7e195b","repo":"zeroclaw-labs/zeroclaw","slug":"tool-name-tool-is-enabled-but-no-allowed-domains","errorCode":null,"errorMessage":"{tool_name} tool is enabled but no allowed_domains are configured. Add [{tool_name}].allowed_domains in config.toml","messagePattern":"(.+?) tool is enabled but no allowed_domains are configured\\. Add \\[(.+?)\\]\\.allowed_domains in config\\.toml","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-tools/src/web_fetch.rs","lineNumber":718,"sourceCode":"    tool_name: &str,\n    validate_dns: impl FnOnce(&str, bool) -> anyhow::Result<()>,\n) -> anyhow::Result<String> {\n    let url = raw_url.trim();\n\n    if url.is_empty() {\n        anyhow::bail!(\"URL cannot be empty\");\n    }\n\n    if url.chars().any(char::is_whitespace) {\n        anyhow::bail!(\"URL cannot contain whitespace\");\n    }\n\n    if !url.starts_with(\"http://\") && !url.starts_with(\"https://\") {\n        anyhow::bail!(\"Only http:// and https:// URLs are allowed\");\n    }\n\n    if allowed_domains.is_empty() {\n        anyhow::bail!(\n            \"{tool_name} tool is enabled but no allowed_domains are configured. \\\n             Add [{tool_name}].allowed_domains in config.toml\"\n        );\n    }\n\n    let host = extract_host(url)?;\n\n    // blocked_domains always takes precedence\n    if domain_guard::host_matches_allowlist(&host, blocked_domains) {\n        anyhow::bail!(\"Host '{host}' is in {tool_name}.blocked_domains\");\n    }\n\n    let host_is_private_or_local = domain_guard::is_private_or_local_host(&host);\n    let private_match = private_allowlist_match(&host, allowed_private_hosts);\n    // An explicit entry (a specific host/IP or suffix) is a deliberate per-host\n    // carve-out; the \"*\" wildcard blanket-tolerates a private/internal\n    // resolution for any host. The distinction only affects the WARN below.\n    let private_explicit = matches!(private_match, PrivateAllow::Explicit);","sourceCodeStart":700,"sourceCodeEnd":736,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-tools/src/web_fetch.rs#L700-L736","documentation":"Error \"{tool_name} tool is enabled but no allowed_domains are configured. Add [{tool_name}].allowed_domains in config.toml\" thrown in zeroclaw-labs/zeroclaw.","triggerScenarios":"Thrown at crates/zeroclaw-tools/src/web_fetch.rs:718 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add [<tool_name>].allowed_domains in config.toml listing permitted hosts."],"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"}