{"record":{"id":"686baa9d1644a2de","repo":"zeroclaw-labs/zeroclaw","slug":"brave-api-key-not-configured-decrypted-value-is-e","errorCode":null,"errorMessage":"Brave API key not configured (decrypted value is empty)","messagePattern":"Brave API key not configured \\(decrypted value is empty\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-tools/src/web_search_tool.rs","lineNumber":166,"sourceCode":"            .ok_or_else(|| {\n                ::zeroclaw_log::record!(\n                    ERROR,\n                    ::zeroclaw_log::Event::new(module_path!(), ::zeroclaw_log::Action::Reject)\n                        .with_outcome(::zeroclaw_log::EventOutcome::Failure)\n                        .with_attrs(::serde_json::json!({\"search_provider\": \"brave\"})),\n                    \"web_search: Brave API key not configured\"\n                );\n                anyhow::Error::msg(\"Brave API key not configured\")\n            })?;\n\n        // Decrypt if necessary.\n        if zeroclaw_config::secrets::SecretStore::is_encrypted(&raw_key) {\n            let zeroclaw_dir = self.config_path.parent().unwrap_or_else(|| Path::new(\".\"));\n            let store =\n                zeroclaw_config::secrets::SecretStore::new(zeroclaw_dir, self.secrets_encrypt);\n            let plaintext = store.decrypt(&raw_key)?;\n            if plaintext.is_empty() {\n                anyhow::bail!(\"Brave API key not configured (decrypted value is empty)\");\n            }\n            Ok(plaintext)\n        } else {\n            Ok(raw_key)\n        }\n    }\n\n    async fn search_duckduckgo(&self, query: &str) -> anyhow::Result<String> {\n        self.search_duckduckgo_at(\"https://html.duckduckgo.com/html/\", query)\n            .await\n    }\n\n    /// Inner DuckDuckGo request implementation, parameterized on the endpoint URL\n    /// so request-flow tests can target a local mock server. Production calls\n    /// always go through [`Self::search_duckduckgo`].\n    async fn search_duckduckgo_at(\n        &self,\n        endpoint_url: &str,","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-tools/src/web_search_tool.rs#L148-L184","documentation":"Error \"Brave API key not configured (decrypted value is empty)\" thrown in zeroclaw-labs/zeroclaw.","triggerScenarios":"Thrown at crates/zeroclaw-tools/src/web_search_tool.rs:166 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the Brave Search API key: `zeroclaw config set tools.web_search.brave.api_key <key>` or re-run `zeroclaw quickstart`.","Verify the configured encrypted secret decrypts to a non-empty value; re-enter the key if it was stored empty."],"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"}