{"record":{"id":"4148c94062706caa","repo":"tinyhumansai/openhuman","slug":"invalid-arguments-for-whatsapp-data-search-message","errorCode":null,"errorMessage":"invalid arguments for whatsapp_data_search_messages: {e}","messagePattern":"invalid arguments for whatsapp_data_search_messages: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/channels/whatsapp_data/tools/search_messages.rs","lineNumber":62,"sourceCode":"                \"account_id\": {\n                    \"type\": \"string\",\n                    \"description\": \"Optional WhatsApp account JID. Omit to span every connected account.\"\n                },\n                \"limit\": {\n                    \"type\": \"integer\",\n                    \"minimum\": 1,\n                    \"description\": \"Maximum messages to return (default 20).\"\n                }\n            },\n            \"required\": [\"query\"]\n        })\n    }\n\n    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        log::debug!(\"[tool][whatsapp_data] search_messages invoked\");\n        let req: SearchMessagesRequest = serde_json::from_value(args).map_err(|e| {\n            log::debug!(\"[tool][whatsapp_data] search_messages invalid_args error={e}\");\n            anyhow::anyhow!(\"invalid arguments for whatsapp_data_search_messages: {e}\")\n        })?;\n        log::debug!(\n            \"[tool][whatsapp_data] search_messages args has_account={} has_chat={} limit={:?} query_len={}\",\n            req.account_id.is_some(),\n            req.chat_id.is_some(),\n            req.limit,\n            req.query.len(),\n        );\n        let messages: Vec<WhatsAppMessage> =\n            match BUS.native().request(methods::SEARCH_MESSAGES, req).await {\n                Ok(messages) => messages,\n                Err(e) if is_handler_absent(&e) => {\n                    log::debug!(\n                        \"[tool][whatsapp_data] search_messages handler_absent — degrading ({e})\"\n                    );\n                    let body = serde_json::to_string(&json!({\n                        \"provider\": \"whatsapp\",\n                        \"count\": 0,","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/channels/whatsapp_data/tools/search_messages.rs#L44-L80","documentation":"The whatsapp_data_search_messages tool arguments failed to deserialize into its request type: the required `query` string is missing, or limit/account_id are the wrong JSON type. Serde error wrapped with the tool prefix before any bus request.","triggerScenarios":"Thrown at src/openhuman/channels/whatsapp_data/tools/search_messages.rs:62 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include the required `query` string","Pass limit as an integer >= 1 and account_id as an optional JID string"],"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"}