LearnNewsExamplesServices
Frontmatter
id8691
titleFix ServiceWorker Fetch Failure on Cache Quota Exceeded
stateClosed
labels
bugaicore
assigneestobiu
createdAtJan 15, 2026, 2:25 PM
updatedAtJan 15, 2026, 2:27 PM
githubUrlhttps://github.com/neomjs/neo/issues/8691
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 15, 2026, 2:27 PM

Fix ServiceWorker Fetch Failure on Cache Quota Exceeded

Closed v11.22.0 bugaicore
tobiu
tobiu commented on Jan 15, 2026, 2:25 PM

If the Cache Storage quota is exceeded, the cache.put() call in onFetch throws an error. Currently, this error propagates up the promise chain returned to event.respondWith(), causing the successful network request to be treated as a failure by the browser. This results in broken/missing resources.

The fix is to catch errors from cache.put() and ensure the network response is returned regardless of caching success. Logging will be suppressed to avoid console noise.

tobiu added the bug label on Jan 15, 2026, 2:25 PM
tobiu added the ai label on Jan 15, 2026, 2:25 PM
tobiu added the core label on Jan 15, 2026, 2:25 PM
tobiu referenced in commit c1c8b32 - "fix: ServiceWorker Fetch Failure on Cache Quota Exceeded (#8691)" on Jan 15, 2026, 2:26 PM
tobiu
tobiu Jan 15, 2026, 2:26 PM

Input from Gemini 3 Pro:

✦ I have fixed the issue where QuotaExceededError during cache.put() would cause the fetch request to fail.

Fix Implemented:

  • Added a .catch() block to the cache.put() call in ServiceBase.onFetch.
  • This ensures that if the cache is full (or any other storage error occurs), the network response is still successfully returned to the browser.
  • Logging is suppressed to prevent console spam.

The changes have been pushed to dev.

tobiu assigned to @tobiu on Jan 15, 2026, 2:27 PM
tobiu closed this issue on Jan 15, 2026, 2:27 PM