{"record":{"id":"83d816c92cc1b945","repo":"tinyhumansai/openhuman","slug":"missing-required-parameter-content","errorCode":null,"errorMessage":"Missing required parameter 'content'","messagePattern":"Missing required parameter 'content'","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/tools/impl/system/insert_sql_record.rs","lineNumber":88,"sourceCode":"        PermissionLevel::Write\n    }\n\n    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        // ── Parameter extraction ────────────────────────────────────────────\n        let session_id = args\n            .get(\"session_id\")\n            .and_then(|v| v.as_str())\n            .ok_or_else(|| anyhow::anyhow!(\"Missing required parameter 'session_id'\"))?;\n\n        let role = args\n            .get(\"role\")\n            .and_then(|v| v.as_str())\n            .ok_or_else(|| anyhow::anyhow!(\"Missing required parameter 'role'\"))?;\n\n        let content = args\n            .get(\"content\")\n            .and_then(|v| v.as_str())\n            .ok_or_else(|| anyhow::anyhow!(\"Missing required parameter 'content'\"))?;\n\n        let lesson = args.get(\"lesson\").and_then(|v| v.as_str());\n\n        // ── Validation ──────────────────────────────────────────────────────\n        if !VALID_ROLES.contains(&role) {\n            return Ok(ToolResult::error(format!(\n                \"Invalid role '{role}'. Must be one of: user, assistant, tool.\"\n            )));\n        }\n\n        if session_id.trim().is_empty() {\n            return Ok(ToolResult::error(\"'session_id' must not be empty.\"));\n        }\n\n        if content.trim().is_empty() {\n            return Ok(ToolResult::error(\"'content' must not be empty.\"));\n        }\n","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/tools/impl/system/insert_sql_record.rs#L70-L106","documentation":"Third in insert_sql_record's extraction chain: 'content' must be a string. This fires when the message body is absent or non-string, after session_id/role validated but before insertion.","triggerScenarios":"Thrown at src/openhuman/tools/impl/system/insert_sql_record.rs:88 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include the non-empty \"content\" string holding the message text"],"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"}