Skip to content

fix(service-worker): throw a critical error when handleFetch fails#51960

Closed
JeanMeche wants to merge 1 commit intoangular:mainfrom
JeanMeche:sw-match-error
Closed

fix(service-worker): throw a critical error when handleFetch fails#51960
JeanMeche wants to merge 1 commit intoangular:mainfrom
JeanMeche:sw-match-error

Conversation

@JeanMeche
Copy link
Member

@JeanMeche JeanMeche commented Sep 29, 2023

#51885 patched a call site that threw an error but there were 2 others calls that needed to be wrapped in the same way by a try/catch.

initializeFully is part of the calls in responseWith(handleFetch).

Same #51885, throwing SwCriticalErrorallows the driver to fallback to safeFetch and ensure responseWith doesn't fail.

Fixes #50378

angular#51885 patched a call site that threw an error but there were 2 others call that needed to be wrapped in the same way by a try/catch.

`initializeFully` is part of the calls in `responseWith(handleFetch)`.

Same angular#51885, throwing `SwCriticalError`allows the driver to fallback to `safeFetch` and ensure `responseWith` doesn't fail.

Fixes angular#50378
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JeanMeche thanks for the PR 👍

@AndrewKushnir AndrewKushnir added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release area: service-worker Issues related to the @angular/service-worker package labels Sep 29, 2023
@ngbot ngbot bot added this to the Backlog milestone Sep 29, 2023
@AndrewKushnir AndrewKushnir added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 2, 2023
JeanMeche added a commit to JeanMeche/angular that referenced this pull request Oct 2, 2023
This commit is a backport to 15.2 of angular#51960 and angular#50378
Throwing `SwCriticalError` allows the driver to fallback to `safeFetch` and ensure responseWith doesn't fail.

Fixes angular#50378
@alxhub
Copy link
Member

alxhub commented Oct 4, 2023

This PR was merged into the repository by commit cc7973f.

@alxhub alxhub closed this in cc7973f Oct 4, 2023
alxhub pushed a commit that referenced this pull request Oct 4, 2023
…51960)

#51885 patched a call site that threw an error but there were 2 others call that needed to be wrapped in the same way by a try/catch.

`initializeFully` is part of the calls in `responseWith(handleFetch)`.

Same #51885, throwing `SwCriticalError`allows the driver to fallback to `safeFetch` and ensure `responseWith` doesn't fail.

Fixes #50378

PR Close #51960
alxhub pushed a commit that referenced this pull request Oct 4, 2023
…1989)

This commit is a backport to 15.2 of #51960 and #50378
Throwing `SwCriticalError` allows the driver to fallback to `safeFetch` and ensure responseWith doesn't fail.

Fixes #50378

PR Close #51989
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 6, 2023
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
…ngular#51960)

angular#51885 patched a call site that threw an error but there were 2 others call that needed to be wrapped in the same way by a try/catch.

`initializeFully` is part of the calls in `responseWith(handleFetch)`.

Same angular#51885, throwing `SwCriticalError`allows the driver to fallback to `safeFetch` and ensure `responseWith` doesn't fail.

Fixes angular#50378

PR Close angular#51960
@JeanMeche JeanMeche deleted the sw-match-error branch February 29, 2024 13:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: service-worker Issues related to the @angular/service-worker package target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FetchEvent.respondWith error iOS/iPadOS 16.4+

3 participants

Comments