Skip to content

fix: Avoid handling promise rejections twice in stability helper #3657

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

atscott
Copy link

@atscott atscott commented Jun 6, 2025

PendingTasks.run reports rejections of the promise to the ErrorHandler. This function already returns a promise that is meant to be handled in the developer's application. If there is handling there, the rejection is handled both in the PendingTasks.run and in the developer callsite.

This change updates the code to use PendingTasks.add instead, which has no built in error handling mechanisms.

fixes angular/angular#61932

`PendingTasks.run` reports rejections of the promise to the
`ErrorHandler`. This function already returns a promise that is meant to
be handled in the developer's application. If there _is_ handling there,
the rejection is handled both in the `PendingTasks.run` and in the
developer callsite.

This change updates the code to use `PendingTasks.add` instead, which
has no built in error handling mechanisms.

fixes angular/angular#61932
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@angular/fire and its use of PendingTasks.run causes promise rejections to be handled twice
2 participants