Skip to content

fix(zone.js): disable wrapping unhandled promise error by default - #52492

Closed
JiaLiPassion wants to merge 1 commit into
angular:mainfrom
JiaLiPassion:disable-unhandle-promise-wrapper
Closed

JiaLiPassion wants to merge 1 commit into
angular:mainfrom
JiaLiPassion:disable-unhandle-promise-wrapper

Conversation

@JiaLiPassion

Copy link
Copy Markdown
Contributor

Before this commit, zone.js wraps the uncaught promise rejection error to a new Error object includes more information such as Zone stack traces. This feature is provided from the very beginning of Zone.js, but this feature becomes very annoying and make the user difficult to debug.

So this commit disable this wrapping behavior by default, and user can enable this feature back by setting
DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION to false.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

Please refer to the commit message above.

@JiaLiPassion JiaLiPassion added the area: zones Issues related to zone.js label Nov 2, 2023
@ngbot ngbot Bot added this to the Backlog milestone Nov 2, 2023
@JiaLiPassion
JiaLiPassion force-pushed the disable-unhandle-promise-wrapper branch from 2ae712a to 1363419 Compare November 2, 2023 16:13
@pullapprove
pullapprove Bot requested a review from AndrewKushnir November 2, 2023 16:13
Before this commit, zone.js wraps the uncaught promise rejection error
to a new Error object includes more information such as Zone stack
traces. This feature is provided from the very beginning of Zone.js,
but this feature becomes very annoying and make the user difficult to
debug.

So this commit disable this wrapping behavior by default, and user can
enable this feature back by setting
`DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION` to `false`.
@JiaLiPassion
JiaLiPassion force-pushed the disable-unhandle-promise-wrapper branch from 1363419 to 6d7eb35 Compare November 2, 2023 16:33
@angular-robot
angular-robot Bot requested a review from AndrewKushnir November 2, 2023 16:33

@AndrewKushnir AndrewKushnir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@AndrewKushnir AndrewKushnir added action: presubmit The PR is in need of a google3 presubmit action: global presubmit The PR is in need of a google3 global presubmit and removed action: presubmit The PR is in need of a google3 presubmit labels Nov 2, 2023
@alan-agius4

alan-agius4 commented Nov 3, 2023 •

Copy link
Copy Markdown
Contributor

TGP. The 3 broken targets are not caused by this change.

@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: global presubmit The PR is in need of a google3 global presubmit labels Nov 3, 2023
@atscott

atscott commented Nov 3, 2023

Copy link
Copy Markdown
Contributor

This PR was merged into the repository by commit 435dd32.

atscott pushed a commit that referenced this pull request Nov 3, 2023
…2492)

Before this commit, zone.js wraps the uncaught promise rejection error
to a new Error object includes more information such as Zone stack
traces. This feature is provided from the very beginning of Zone.js,
but this feature becomes very annoying and make the user difficult to
debug.

So this commit disable this wrapping behavior by default, and user can
enable this feature back by setting
`DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION` to `false`.

PR Close #52492
@atscott atscott closed this in 435dd32 Nov 3, 2023
Abseil-byte pushed a commit to Abseil-byte/angular that referenced this pull request Nov 5, 2023
…gular#52492)

Before this commit, zone.js wraps the uncaught promise rejection error
to a new Error object includes more information such as Zone stack
traces. This feature is provided from the very beginning of Zone.js,
but this feature becomes very annoying and make the user difficult to
debug.

So this commit disable this wrapping behavior by default, and user can
enable this feature back by setting
`DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION` to `false`.

PR Close angular#52492
@angular-automatic-lock-bot

Copy link
Copy Markdown

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 Dec 4, 2023
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
…gular#52492)

Before this commit, zone.js wraps the uncaught promise rejection error
to a new Error object includes more information such as Zone stack
traces. This feature is provided from the very beginning of Zone.js,
but this feature becomes very annoying and make the user difficult to
debug.

So this commit disable this wrapping behavior by default, and user can
enable this feature back by setting
`DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION` to `false`.

PR Close angular#52492
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: zones Issues related to zone.js target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants