Service Worker registration does not use ErrorHandler #39913
Labels
area: service-worker
Issues related to the @angular/service-worker package
P4
A relatively minor issue that is not relevant to core functions
type: bug/fix
Milestone
🐞 bug report
Affected Package
The issue is caused by package @angular/service-workerIs this a regression?
No, I don't think so,
Description
The Service Worker registration logs an error in the console when the it fails. I think that's confusing and it would be better to use the ErrorHandler which other parts of Angular use. That way Angular users could handle the error themselves.
🔬 Minimal Reproduction
As far as I know there is not really an easy way to reproduce this besides deploying a broken app. I hope it's okay to point to the source instead.
angular/packages/service-worker/src/module.ts
Lines 132 to 133 in 11cd37f
This is where the Service Worker gets registered and possible errors get logged to the console directly.
🔥 Exception or Error
🌍 Your Environment
Angular Version:
Anything else relevant?
I would be happy to create a PR for fixing this. Please let me know if I should do so.
The text was updated successfully, but these errors were encountered: