fix(hooks): catch storage write/remove errors gracefully in useLocalStorage (#5) - #87
Open
ghzhost wants to merge 1 commit into
Open
fix(hooks): catch storage write/remove errors gracefully in useLocalStorage (#5)#87ghzhost wants to merge 1 commit into
ghzhost wants to merge 1 commit into
Conversation
…torage (StellarSend#5) - Wrap localStorage.setItem and localStorage.removeItem in try/catch blocks - Log warning to console on storage failure while keeping in-memory state functional - Use useCallback for stable set/remove handlers across renders - Add comprehensive unit tests covering read fallback, set, quota exceeded, and removal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses #5: .
Changes
HOME='/home/node'
HOSTNAME='instance-20220302-0334'
IFS='
'
NODE_ENV='production'
NODE_VERSION='24.16.0'
OPENCLAW_CLI='1'
OPENCLAW_GATEWAY_PORT='18789'
OPENCLAW_PATH_BOOTSTRAPPED='1'
OPENCLAW_SHELL='exec'
OPTIND='1'
PATH='/home/node/.cargo/bin:/home/node/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/sbin:/usr/sbin:/sbin:/home/node/.local/share/pnpm'
PLAYWRIGHT_BROWSERS_PATH='/home/node/.cache/ms-playwright'
PPID='7'
PS1='$ '
PS2='> '
PS4='+ '
PWD='/home/node/.openclaw/workspace'
YARN_VERSION='1.22.22' and callbacks using .
Closes #5.