{"record":{"id":"161bf742629d24eb","repo":"home-assistant/core","slug":"todo-update-item-failed","errorCode":null,"errorMessage":"todo_update_item_failed","messagePattern":"todo_update_item_failed","errorType":"exception","errorClass":"HomeAssistantError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/bring/todo.py","lineNumber":180,"sourceCode":"        if TYPE_CHECKING:\n            assert item.uid\n            assert current_item\n\n        if item.summary == current_item.itemId:\n            try:\n                await self.coordinator.bring.batch_update_list(\n                    self._list_uuid,\n                    BringItem(\n                        itemId=item.summary or \"\",\n                        spec=item.description or \"\",\n                        uuid=item.uid,\n                    ),\n                    BringItemOperation.ADD\n                    if item.status == TodoItemStatus.NEEDS_ACTION\n                    else BringItemOperation.COMPLETE,\n                )\n            except BringRequestException as e:\n                raise HomeAssistantError(\n                    translation_domain=DOMAIN,\n                    translation_key=\"todo_update_item_failed\",\n                    translation_placeholders={\"name\": item.summary or \"\"},\n                ) from e\n        else:\n            try:\n                await self.coordinator.bring.batch_update_list(\n                    self._list_uuid,\n                    [\n                        BringItem(\n                            itemId=current_item.itemId,\n                            spec=item.description or \"\",\n                            uuid=item.uid,\n                            operation=BringItemOperation.REMOVE,\n                        ),\n                        BringItem(\n                            itemId=item.summary or \"\",\n                            spec=item.description or \"\",","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/bring/todo.py#L162-L198","documentation":"Raised by async_update_todo_item when the batch_update_list call that applies the update fails with BringRequestException. The update path either re-adds the item (for items only in Bring's 'recent' list) or patches the existing item by its current itemId. The error means the multi-item batch request was rejected or failed in transport.","triggerScenarios":"Marking a To-do item complete/incomplete or editing it via the UI/services while Bring's batch endpoint fails: stale uuid/itemId, session expiry, network error. Triggered specifically by coordinator.bring.batch_update_list raising BringRequestException.","commonSituations":"Updating an item that was concurrently modified or removed from another device (item id no longer valid), expired auth session, Bring cloud hiccup, updating items whose uid came from HA's recent-list mapping.","solutions":["Refresh the To-do list view (forces coordinator async_refresh) and retry the update against current item data.","Reload the Bring integration to rebuild the item uuid -> Bring itemId mapping.","Re-authenticate if every request fails (auth expiry).","Check whether the item still exists in the Bring app; if deleted remotely, re-create it instead of updating."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"async def item_exists(coordinator, list_uuid, uid) -> bool:\n    \"\"\"Verify the uid is still present in Bring's current list state.\"\"\"\n    items = coordinator.data.get(list_uuid, {}).get(\"items\", [])\n    return any(i.get(\"uuid\") == uid for i in items)","typeGuard":null,"tryCatchPattern":"try:\n    await todo_entity.async_update_todo_item(item)\nexcept HomeAssistantError as err:\n    if err.translation_key == \"todo_update_item_failed\":\n        await coordinator.async_refresh()  # resync uuid -> itemId mapping, then let the user retry\n    else:\n        raise","preventionTips":["Always update against items obtained from the latest coordinator refresh, not cached state.","Refresh after external edits on the phone app before issuing updates from HA.","Treat repeated update failures as a signal to reload the integration."],"tags":["home-assistant","bring","todo","sync-conflict"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}