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

fix(service-worker): handle error with ErrorHandler #39990

Closed
wants to merge 1 commit into from
Closed

fix(service-worker): handle error with ErrorHandler #39990

wants to merge 1 commit into from

Conversation

chrisguttandin
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #39913

What is the new behavior?

Errors thrown when trying to register a Service Worker are now passed to the global ErrorHandler.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@google-cla google-cla bot added the cla: yes label Dec 5, 2020
@pullapprove pullapprove bot requested a review from IgorMinar December 5, 2020 16:39
@gkalpak gkalpak added action: review The PR is still awaiting reviews from at least one requested reviewer area: service-worker Issues related to the @angular/service-worker package target: patch This PR is targeted for the next patch release type: bug/fix labels Dec 5, 2020
@ngbot ngbot bot modified the milestone: Backlog Dec 5, 2020
Copy link
Member

@gkalpak gkalpak left a comment

Choose a reason for hiding this comment

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

Thx for working on this, @chrisguttandin 👍

I've left a couple of minor comments. Could you also add a test for the new behavior in service-worker/test/module_spec.ts?

Also, let's add a short description of the motivation for the change in the commit message body and also add Fixes #39913 at the bottom (per our commit message guidelines).

packages/service-worker/src/module.ts Outdated Show resolved Hide resolved
packages/service-worker/src/module.ts Outdated Show resolved Hide resolved
@chrisguttandin
Copy link
Contributor Author

Hi @gkalpak, thanks for your feedback. I made the changes and updated the test. Please let me know if there is anything else I should change.

@gkalpak gkalpak closed this Dec 6, 2020
@gkalpak gkalpak reopened this Dec 6, 2020
Copy link
Member

@gkalpak gkalpak left a comment

Choose a reason for hiding this comment

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

One super-minor nit. Otherwise lgtm (as long as CI is happy 😃)
Thx again, @chrisguttandin

packages/service-worker/test/module_spec.ts Outdated Show resolved Hide resolved
@gkalpak gkalpak added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Dec 6, 2020
@gkalpak gkalpak removed the request for review from IgorMinar December 6, 2020 11:30
@gkalpak gkalpak added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Dec 6, 2020
Errors thrown by calling serviceWorker.register() are now passed to the global ErrorHandler.

Fixes #39913
@mhevery mhevery closed this in 74e42cf Dec 8, 2020
mhevery pushed a commit that referenced this pull request Dec 8, 2020
Errors thrown by calling serviceWorker.register() are now passed to the global ErrorHandler.

Fixes #39913

PR Close #39990
@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 Jan 8, 2021
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 cla: yes target: patch This PR is targeted for the next patch release type: bug/fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants