Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle the quota exceeded error globally #971

Open
lewispham opened this issue Sep 1, 2016 · 2 comments
Open

Handle the quota exceeded error globally #971

lewispham opened this issue Sep 1, 2016 · 2 comments

Comments

@lewispham
Copy link

Basically, I want to show a warning message to users when the storage quota for my app is exceeded. Catching the error QuotaExceededError on every write operations (caches.open, cache.put, etc) is quite painful. How can I handle it globally? Or is there any better approach for this situation?

@jakearchibald
Copy link
Contributor

What's painful about it? Give that there may be other reasons for storage methods to fail, would we be saving much by having a global event for this?

@lewispham
Copy link
Author

What's painful about it? Give that there may be other reasons for storage methods to fail, would we be saving much by having a global event for this?

I'm not sure about others. But my app was designed to use Cache API as a replacement for browser cache. So I use it pretty much everywhere in my app. Catching errors of every single write operations is quite painful to me. I actually expect a global event fired when the storage quota is exceeded, so that I can show some recommendations to users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants