Skip to content

Comments

fix: handle localStorage errors in private browsing#298

Merged
pradeeban merged 2 commits intoControlCore-Project:devfrom
avinxshKD:fix/localStorage-error-handling
Feb 18, 2026
Merged

fix: handle localStorage errors in private browsing#298
pradeeban merged 2 commits intoControlCore-Project:devfrom
avinxshKD:fix/localStorage-error-handling

Conversation

@avinxshKD
Copy link

Wrapped all localStorage calls in try-catch blocks to prevent app crashes when localStorage is disabled (private browsing, quota exceeded, etc)

Fixes #291

Changes are...

Added error handling wrappers to local-storage-manager.js for all storage operations
Wrapped localStorage calls in fileBrowser.jsx with try-catch blocks
Show toast error with the exception message when storage fails

@avinxshKD avinxshKD force-pushed the fix/localStorage-error-handling branch from 7c30dee to 87c79df Compare February 15, 2026 06:43
@pradeeban
Copy link
Member

Can you say "localStorage" rather than "ls" throughout your code? We still want our code to be human-readable.

@avinxshKD
Copy link
Author

@pradeeban done, renamed all three to localStorageGet, localStorageSet, and localStorageRemove

nd also double-checked all call sites in the file are updated, no leftover abbreviations. Let me know if any adjustments needed, happy to

@pradeeban pradeeban merged commit 70ca6ad into ControlCore-Project:dev Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants