Please sign in to comment.
fix(service-worker): avoid uncaught rejection warning when registrati…
…on fails (#30876) Service worker API `navigator.serviceWorker.register` can fail in multiple ways. For example, in Chrome, with an unstable network connection you can have the following error: `An unknown error occurred when fetching the script.` In the current state, it creates an `Uncaught (in promise) TypeError:` style of error, which cannot be caught by the user on his own. I think it's better to log the error over raising an error that cannot be caught. PR Close #30876
- Loading branch information...
Showing with 16 additions and 4 deletions.