-
Notifications
You must be signed in to change notification settings - Fork 487
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Description
Add error handling and rollback logic for optimistic cache updates in updateAssetMetadata and updateAssetTags functions in src/stores/assetsStore.ts.
Currently, these functions update the cache optimistically before making the network request to assetService.updateAsset. If the network request fails, the UI state remains out of sync with the server state.
Enhancement
Implement rollback mechanism to:
- Capture previous asset state(s) before optimistic update
- Restore previous state(s) on network failure
- Re-throw or handle errors appropriately after rollback
Context
Related PR: #8090
Discussion: #8090 (comment)
Requested by: @DrJKL
┆Issue is synchronized with this Notion page by Unito
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request