We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Library Affected: workbox-background-sync
Browser & Platform: Google Chrome v72.0
Issue or Feature Request Description: I am attempting to override the onSync method such that failing status codes add the request back to the queue:
onSync
const response = await fetch(entry.request.clone()) if ([504, 500].includes(response.status)) { throw new Error('Cannot reach server') }
This results in an infinite loop of syncs to occur.
The text was updated successfully, but these errors were encountered:
I believe this happens because adding a request back to the queue causes a new sync to be triggered.
workbox/packages/workbox-background-sync/Queue.mjs
Lines 182 to 183 in bd5f411
Sorry, something went wrong.
CC: @philipwalton for visibility.
philipwalton
No branches or pull requests
Library Affected:
workbox-background-sync
Browser & Platform:
Google Chrome v72.0
Issue or Feature Request Description:
I am attempting to override the
onSync
method such that failing status codes add the request back to the queue:This results in an infinite loop of syncs to occur.
The text was updated successfully, but these errors were encountered: