{"record":{"id":"0c7f554e85a89687","repo":"tinyhumansai/openhuman","slug":"invalid-arguments-for-whatsapp-data-list-chats-e","errorCode":null,"errorMessage":"invalid arguments for whatsapp_data_list_chats: {e}","messagePattern":"invalid arguments for whatsapp_data_list_chats: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/channels/whatsapp_data/tools/list_chats.rs","lineNumber":57,"sourceCode":"                \"limit\": {\n                    \"type\": \"integer\",\n                    \"minimum\": 1,\n                    \"description\": \"Maximum chats to return (default 50).\"\n                },\n                \"offset\": {\n                    \"type\": \"integer\",\n                    \"minimum\": 0,\n                    \"description\": \"Pagination offset (default 0).\"\n                }\n            }\n        })\n    }\n\n    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        log::debug!(\"[tool][whatsapp_data] list_chats invoked\");\n        let req: ListChatsRequest = serde_json::from_value(args).map_err(|e| {\n            log::debug!(\"[tool][whatsapp_data] list_chats invalid_args error={e}\");\n            anyhow::anyhow!(\"invalid arguments for whatsapp_data_list_chats: {e}\")\n        })?;\n        log::debug!(\n            \"[tool][whatsapp_data] list_chats args has_account={} limit={:?} offset={:?}\",\n            req.account_id.is_some(),\n            req.limit,\n            req.offset,\n        );\n        let chats: Vec<WhatsAppChat> = match BUS.native().request(methods::LIST_CHATS, req).await {\n            Ok(chats) => chats,\n            Err(e) if is_handler_absent(&e) => {\n                // Headless / CLI / docker: no desktop shell handler is\n                // registered. Degrade gracefully to an empty result.\n                log::debug!(\"[tool][whatsapp_data] list_chats handler_absent — degrading ({e})\");\n                let body = serde_json::to_string(&json!({\n                    \"provider\": \"whatsapp\",\n                    \"count\": 0,\n                    \"chats\": [],\n                    \"note\": UNAVAILABLE_NOTE,","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/channels/whatsapp_data/tools/list_chats.rs#L39-L75","documentation":"The whatsapp_data_list_chats tool arguments failed to deserialize into ListChatsRequest: a required field missing or limit/offset of the wrong JSON type. Serde's error is wrapped with the tool-name prefix; fires before any native bus request is made.","triggerScenarios":"Thrown at src/openhuman/channels/whatsapp_data/tools/list_chats.rs:57 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass limit as an integer >= 1 and offset as an integer >= 0","Check the serde message for the exact offending field"],"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-14T05:17:10.506Z"}