Unverified Commit c0cd530a authored by Josh Story's avatar Josh Story Committed by GitHub

Allow silencing unhandled rejection filter warnings and improve debugging (#84572)

The original debug logs were added to help validate the filter worked
correctly in real applications. They leak implementation details which
is more permissive than ideal. One reason to keep these around however
is if you end up seeing the filter being removed you might want to
understand what code is actually doing the removal. The debug mode now
allows you to receive stacks so you can pinpoint what is manipulating
the listeners.

Additionally if you are ok with whatever is leading to these warnings
you might want to quiet them. This introduces a silent mode

Additionally this removes any warnings except for the one about
uninstalling the filter because doing so is so likely to be a bad idea
that we must highlight it if it is happening.
parent 844f0a62
...@@ -7,7 +7,6 @@ describe('Cache Components Errors', () => { ...@@ -7,7 +7,6 @@ describe('Cache Components Errors', () => {
skipDeployment: true, skipDeployment: true,
skipStart: !isNextDev, skipStart: !isNextDev,
env: { env: {
NEXT_USE_UNHANDLED_REJECTION_FILTER: 'enabled',
NODE_OPTIONS: '--require ./patch-console.js', NODE_OPTIONS: '--require ./patch-console.js',
}, },
}) })
......
...@@ -7,9 +7,6 @@ describe('Cache Components Errors', () => { ...@@ -7,9 +7,6 @@ describe('Cache Components Errors', () => {
files: __dirname + '/fixtures/default', files: __dirname + '/fixtures/default',
skipStart: !isNextDev, skipStart: !isNextDev,
skipDeployment: true, skipDeployment: true,
env: {
NEXT_USE_UNHANDLED_REJECTION_FILTER: 'enabled',
},
}) })
const isRspack = !!process.env.NEXT_RSPACK const isRspack = !!process.env.NEXT_RSPACK
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment