intermine / intermine/bluegenes
Try-catch around localstorage access
- Dominant language
- Clojure
- Stars
- 75
- Forks
- 59
- PR merge metrics
- No merged PRs in 30d
Description
There are ways a localstorage read/write can fail and throw something like `Uncaught DOMException: The quota has been exceeded.`. This can be because the browser doesn't support it (i.e. Safari in private mode) or localstorage has reached its global limit (as reported by @sammyjava). We should wrap them in a try-catch and dispatch a :messages/add telling the user, "Failed to read/write to localstorage. Please use a different browser or clear your browser data as it may be full."
Contributor guide
Research direction
Search the ClojureScript codebase for localStorage reads and writes, then inspect the existing :messages/add dispatch path. Handle failures for both operations with the specified user-facing message, and verify that normal storage behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100