Skip to content

Conversation

@SkyZeroZx
Copy link
Contributor

feat(service-worker): Add messageerror event handling and logging

Enables proper handling and logging of message deserialization errors in Angular Service Workers, improving error detection and debugging capabilities for corrupted or unsupported message formats.

The change includes:

  • Added messageerror event listener to the Driver class
  • Implemented onMessageError method for handling message deserialization errors
  • Added comprehensive unit tests to verify the new functionality
  • Updated test harness to support messageerror event simulation
  • Enhanced error logging with origin information for better debugging

Motivation/Use Cases

The messageerror event handling is particularly useful for:

  • Error Detection: Identifying when messages cannot be deserialized due to corrupted data
  • Debugging Support: Providing detailed logging information about message errors
  • Robust Error Handling: Gracefully handling unsupported message formats without breaking the service worker
  • Compliance with Service Worker Standards: Implementing the full messageerror event specification

Add messageerror event handling and logging to Driver class
@pullapprove pullapprove bot requested a review from mmalerba July 26, 2025 19:38
@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 Jul 26, 2025
@ngbot ngbot bot added this to the Backlog milestone Jul 26, 2025
@mmalerba mmalerba added the action: merge The PR is ready for merge by the caretaker label Jul 31, 2025
@thePunderWoman thePunderWoman added the target: minor This PR is targeted for the next minor release label Jul 31, 2025
@thePunderWoman
Copy link
Contributor

This PR was merged into the repository by commit 8255e0c.

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 Aug 31, 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.

3 participants