forked from KathiraveluLab/DHGWorkflow
-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
I was testing the app in private browsing mode and it crashes immediately when trying to save graphs. Turns out all the localStorage calls in src/graph-builder/local-storage-manager.js and src/component/fileBrowser.jsx have zero error handling.
Lines like:
window.localStorage.setItem(this.ALL_GRAPHS, window.btoa(JSON.stringify(Array.from(this.allgs))));Just throw and kill the app when localStorage is disabled or quota exceeded. No try-catch, no fallback, nothing.
Would be good to wrap these in try-catch blocks and either:
- Show a toast notification that persistence is unavailable
- Fall back to in-memory storage for the session
- Both
Similar to how the Axios error handling works elsewhere in the codebase.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels