{"record":{"id":"6fc8c37ea672658e","repo":"tinyhumansai/openhuman","slug":"todo-replace-invalid-cards-e","errorCode":null,"errorMessage":"todo_replace: invalid cards: {e}","messagePattern":"todo_replace: invalid cards: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/threads/todos/tools.rs","lineNumber":472,"sourceCode":"                    \"items\": { \"type\": \"object\" }\n                }\n            },\n            \"required\": [\"cards\"]\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][todos] replace invoked\");\n        let cards_val = args\n            .get(\"cards\")\n            .cloned()\n            .ok_or_else(|| anyhow::anyhow!(\"missing required array argument `cards`\"))?;\n        let cards = serde_json::from_value(cards_val)\n            .map_err(|e| anyhow::anyhow!(\"todo_replace: invalid cards: {e}\"))?;\n        let location = board_location(&self.config, &args);\n        let snapshot = ops::replace(&location, cards)\n            .await\n            .map_err(|e| anyhow::anyhow!(\"todo_replace: {e}\"))?;\n        snapshot_to_result(snapshot)\n    }\n}\n\n/// Empty the board. **Destructive** — default-OFF.\npub struct TodoClearTool {\n    config: Arc<Config>,\n}\n\nimpl TodoClearTool {\n    pub fn new(config: Arc<Config>) -> Self {\n        Self { config }\n    }\n}","sourceCodeStart":454,"sourceCodeEnd":490,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/threads/todos/tools.rs#L454-L490","documentation":"todo_replace could not deserialize the 'cards' array into TaskBoardCard objects: at least one element is missing a required field (e.g. id, content, status) or has a wrong-typed field. The serde error {e} names the offending card and field.","triggerScenarios":"Thrown at src/openhuman/threads/todos/tools.rs:472 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check {e} for the exact card index and field at fault","Ensure every card object carries the required fields with correct types","Fetch the current board first and modify it rather than hand-writing cards from scratch"],"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"}