Skip to content

Conversation

SkyZeroZx
Copy link
Contributor

feat(service-worker): Add unhandledrejection event handling and logging
Enables proper handling and logging of unhandled promise rejections in Angular Service Workers, improving error detection and debugging capabilities for silent failures and uncaught promise rejections.

The change includes:

  • Added unhandledrejection event listener to the Driver class
  • Implemented onUnhandledRejection method for handling unhandled promise rejections
  • Added unit tests to verify the new functionality
  • Updated test harness to support unhandledrejection event simulation
  • Enhanced error logging with rejection reason information for better debugging

Motivation/Use Cases

  • Silent Failure Detection: Identifying when promises are rejected but not caught, preventing silent failures

  • Debugging Support: Providing detailed logging information about unhandled promise rejections with the specific rejection reason

  • Compliance with Standards: Implementing the full unhandledrejection event specification for comprehensive error handling

…rker

Adds handling and logging for unhandled promise rejections to improve debugging and prevent silent failures. Updates tests and test harness to verify logging of rejection reasons
@pullapprove pullapprove bot requested a review from devversion August 8, 2025 01:52
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: service-worker Issues related to the @angular/service-worker package labels Aug 8, 2025
@ngbot ngbot bot added this to the Backlog milestone Aug 8, 2025
@devversion devversion added the action: review The PR is still awaiting reviews from at least one requested reviewer label Aug 8, 2025
@devversion
Copy link
Member

Adding one more team member to make sure this is something we want to do.

Copy link
Contributor

@thePunderWoman thePunderWoman left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

@thePunderWoman thePunderWoman added action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Aug 8, 2025
@atscott
Copy link
Contributor

atscott commented Aug 8, 2025

This PR was merged into the repository by commit 3b214d2.

The changes were merged into the following branches: main

@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 Sep 8, 2025
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 detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants