{"record":{"id":"5869e65a66e3f259","repo":"tinyhumansai/openhuman","slug":"invalid-patch-e","errorCode":null,"errorMessage":"invalid patch: {e}","messagePattern":"invalid patch: (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/integrations/task_sources/tools.rs","lineNumber":454,"sourceCode":"                \"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 }\n    }\n}","sourceCodeStart":436,"sourceCodeEnd":472,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/integrations/task_sources/tools.rs#L436-L472","documentation":"The `patch` argument passed to the task-source update tool failed serde deserialization into `TaskSourcePatch`. The schema advertises a partial object with camelCase fields, so this fires when the caller sends snake_case keys, wrong value types (e.g. a string where a boolean or number is expected), or unknown/non-patch fields — the deserializer, not a domain check, rejects it.","triggerScenarios":"Thrown at src/openhuman/integrations/task_sources/tools.rs:454 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send the patch object with camelCase field names exactly as declared in the tool's parameters schema","Check each field's declared type (boolean/string/number) and match it","Remove keys that are not part of TaskSourcePatch or that the partial schema does not accept","Log the serde error text `{e}` — it names the offending field and expected type"],"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"}