Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(core): Wrap ErrorEvent with no error property #62081

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

Closed
wants to merge 1 commit into from

Conversation

atscott
Copy link
Contributor

@atscott atscott commented Jun 16, 2025

This commit updates the global error listener to wrap the global ErrorEvent in a new Error with cause if the error property is undefined.

fixes #62078

@atscott atscott added area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release labels Jun 16, 2025
@ngbot ngbot bot added this to the Backlog milestone Jun 16, 2025
@JoostK JoostK added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Jun 16, 2025
@atscott atscott removed the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Jun 16, 2025
@atscott atscott force-pushed the erroreventresizeobserver branch 2 times, most recently from 392de4c to ed8d8bf Compare June 16, 2025 17:28
@atscott atscott requested a review from JoostK June 16, 2025 22:41
Copy link
Member

@JoostK JoostK left a comment

Choose a reason for hiding this comment

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

A test would be nice to have this accounted for in coverage

@atscott atscott force-pushed the erroreventresizeobserver branch from ed8d8bf to b6451b6 Compare June 17, 2025 20:36
@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Jun 17, 2025
@@ -65,4 +65,34 @@ describe('ErrorHandler', () => {
expect(spy.calls.count()).toBe(1);
window.onerror = originalWindowOnError;
});

it('installs global error handler once', async () => {
Copy link
Member

Choose a reason for hiding this comment

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

"handles error events without error"

This commit updates the global error listener to wrap the global ErrorEvent in a new Error with cause
if the error property is undefined.

fixes angular#62078
@atscott atscott force-pushed the erroreventresizeobserver branch from b6451b6 to bd914c2 Compare June 17, 2025 21:14
@pkozlowski-opensource
Copy link
Member

This PR was merged into the repository by commit 572c32a.

The changes were merged into the following branches: main, 20.0.x

pkozlowski-opensource pushed a commit that referenced this pull request Jun 18, 2025
This commit updates the global error listener to wrap the global ErrorEvent in a new Error with cause
if the error property is undefined.

fixes #62078

PR Close #62081
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

provideBrowserGlobalErrorListeners() forwards null error for ResizeObserver loop warning
4 participants