tinyhumansai/openhuman · error
invalid arguments for whatsapp_data_search_messages: {e}
Error message
invalid arguments for whatsapp_data_search_messages: {e} What it means
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.
Source
Thrown at src/openhuman/channels/whatsapp_data/tools/search_messages.rs:62
"account_id": {
"type": "string",
"description": "Optional WhatsApp account JID. Omit to span every connected account."
},
"limit": {
"type": "integer",
"minimum": 1,
"description": "Maximum messages to return (default 20)."
}
},
"required": ["query"]
})
}
async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {
log::debug!("[tool][whatsapp_data] search_messages invoked");
let req: SearchMessagesRequest = serde_json::from_value(args).map_err(|e| {
log::debug!("[tool][whatsapp_data] search_messages invalid_args error={e}");
anyhow::anyhow!("invalid arguments for whatsapp_data_search_messages: {e}")
})?;
log::debug!(
"[tool][whatsapp_data] search_messages args has_account={} has_chat={} limit={:?} query_len={}",
req.account_id.is_some(),
req.chat_id.is_some(),
req.limit,
req.query.len(),
);
let messages: Vec<WhatsAppMessage> =
match BUS.native().request(methods::SEARCH_MESSAGES, req).await {
Ok(messages) => messages,
Err(e) if is_handler_absent(&e) => {
log::debug!(
"[tool][whatsapp_data] search_messages handler_absent — degrading ({e})"
);
let body = serde_json::to_string(&json!({
"provider": "whatsapp",
"count": 0,View on GitHub (pinned to 7491200858)
Solutions
- Include the required `query` string
- Pass limit as an integer >= 1 and account_id as an optional JID string
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/openhuman/channels/whatsapp_data/tools/search_messages.rs:62 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17).
Data as JSON: /api/errors/4148c94062706caa.
Report an issue: GitHub.