{"record":{"id":"8068804529d6d301","repo":"zeroclaw-labs/zeroclaw","slug":"bocha-ai-api-key-not-configured-decrypted-value-i","errorCode":null,"errorMessage":"Bocha AI API key not configured (decrypted value is empty)","messagePattern":"Bocha AI 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":686,"sourceCode":"                    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\": \"bocha\"})),\n                    \"web_search: Bocha AI API key not configured\"\n                );\n                anyhow::Error::msg(\n                    \"Bocha AI API key not configured. Set [web_search] bocha_api_key in \\\n                     config.toml. Obtain one at https://open.bochaai.com\",\n                )\n            })?;\n\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!(\"Bocha AI 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_bocha(&self, query: &str) -> anyhow::Result<String> {\n        let builder = reqwest::Client::builder().timeout(Duration::from_secs(self.timeout_secs));\n        let builder =\n            zeroclaw_config::schema::apply_runtime_proxy_to_builder(builder, \"tool.web_search\");\n        let client = builder.build()?;\n        self.search_bocha_with_client(&client, \"https://api.bochaai.com/v1/web-search\", query)\n            .await\n    }\n\n    async fn search_bocha_with_client(\n        &self,","sourceCodeStart":668,"sourceCodeEnd":704,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-tools/src/web_search_tool.rs#L668-L704","documentation":"Error \"Bocha AI API key not configured (decrypted value is empty)\" thrown in zeroclaw-labs/zeroclaw.","triggerScenarios":"Thrown at crates/zeroclaw-tools/src/web_search_tool.rs:686 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the Bocha AI API key in the web_search configuration or via `zeroclaw quickstart`.","Re-enter the key if the decrypted value came back 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"}