{"record":{"id":"1ce2b12d8357f478","repo":"tinyhumansai/openhuman","slug":"missing-required-object-argument-patch","errorCode":null,"errorMessage":"missing required object argument `patch`","messagePattern":"missing required object argument `patch`","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/integrations/task_sources/tools.rs","lineNumber":452,"sourceCode":"            \"properties\": {\n                \"id\": { \"type\": \"string\", \"description\": \"Task-source id to update.\" },\n                \"patch\": { \"type\": \"object\", \"description\": \"Partial TaskSourcePatch (camelCase fields).\" }\n            },\n            \"required\": [\"id\", \"patch\"]\n        })\n    }\n\n    fn permission_level(&self) -> PermissionLevel {\n        PermissionLevel::Write\n    }\n\n    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        log::debug!(\"[tool][task_sources] update invoked\");\n        let id = read_required_str(&args, \"id\")?;\n        let patch_val = args\n            .get(\"patch\")\n            .cloned()\n            .ok_or_else(|| anyhow::anyhow!(\"missing required object argument `patch`\"))?;\n        let patch: TaskSourcePatch =\n            serde_json::from_value(patch_val).map_err(|e| anyhow::anyhow!(\"invalid patch: {e}\"))?;\n        emit!(\n            ops::update(&self.config, &id, patch).await,\n            \"task_source_update\"\n        )\n    }\n}\n\n/// Delete a task source and its ingested history. **Destructive** —\n/// default-OFF.\npub struct TaskSourceRemoveTool {\n    config: Arc<Config>,\n}\n\nimpl TaskSourceRemoveTool {\n    pub fn new(config: Arc<Config>) -> Self {\n        Self { config }","sourceCodeStart":434,"sourceCodeEnd":470,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/integrations/task_sources/tools.rs#L434-L470","documentation":"Argument-validation error in the task-source update tool's execute: the JSON-RPC/tool arguments failed read_required_str-style extraction of the required object argument `patch` (missing, non-object, or null). The tool's schema declares both `id` and `patch` required; this fires when the model or caller omits the partial TaskSourcePatch object.","triggerScenarios":"Thrown at src/openhuman/integrations/task_sources/tools.rs:452 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include a 'patch' object with the camelCase fields to change","Check the id/patch pair matches the tool schema's required list"],"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"}