{"record":{"id":"e6f21856df8c3d7b","repo":"tinyhumansai/openhuman","slug":"missing-required-parameter-query-e6f218","errorCode":null,"errorMessage":"Missing required parameter: query","messagePattern":"Missing required parameter: query","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/search/tools/web_search.rs","lineNumber":178,"sourceCode":"\n    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        self.execute_with_options(args, ToolCallOptions::default())\n            .await\n    }\n\n    fn supports_markdown(&self) -> bool {\n        true\n    }\n\n    async fn execute_with_options(\n        &self,\n        args: serde_json::Value,\n        options: ToolCallOptions,\n    ) -> anyhow::Result<ToolResult> {\n        let query = args\n            .get(\"query\")\n            .and_then(|q| q.as_str())\n            .ok_or_else(|| anyhow::anyhow!(\"Missing required parameter: query\"))?;\n\n        if query.trim().is_empty() {\n            anyhow::bail!(\"Search query cannot be empty\");\n        }\n        let query = query.trim().to_string();\n\n        if let Some(direct_search) = &self.direct_search {\n            tracing::debug!(\n                query_len = query.chars().count(),\n                max_results = self.max_results,\n                timeout_secs = self.timeout_secs,\n                \"[web_search] direct Seltz search\"\n            );\n            let mut normalized_args = args;\n            if let Some(obj) = normalized_args.as_object_mut() {\n                obj.insert(\"query\".to_string(), Value::String(query.clone()));\n            }\n            return direct_search","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/search/tools/web_search.rs#L160-L196","documentation":"Argument-validation guard in WebSearchTool::execute_with_options: the args lack a \"query\" key or hold a non-string value (whitespace-only strings pass here and are rejected by the next empty-query check). The unified web-search entry point cannot route a search without a query, so it fails before any provider dispatch. Generic guard; the faulting input is a missing or non-string query.","triggerScenarios":"Thrown at src/openhuman/search/tools/web_search.rs:178 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Call the web search tool with a non-empty string \"query\" argument.","Verify upstream code that builds the query produces a string.","Trim user input and re-prompt when the field is omitted."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}