You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How often does it reproduce? Is there a required condition?
This will repro 100% of the time
What is the expected behavior? Why is that the expected behavior?
We should see
"F2""F1"
Inside the f1 handler, we set Error.prepareStackTrace. It makes sense that the original error (e1) isn't affected, since it's already being handled, but e2 should use the newest Error.prepareStackTrace function.
What do you see instead?
Error: e2
at Function.f1 (/home/eli/code/nodejs-agent/tests/one_offs/prepareStackTrace_nest.js:4:15)
at maybeOverridePrepareStackTrace (node:internal/errors:141:29)
at prepareStackTrace (node:internal/errors:115:5)
at Object.<anonymous> (/home/eli/code/nodejs-agent/tests/one_offs/prepareStackTrace_nest.js:14:24)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at node:internal/main/run_main_module:23:47
F1
So it looks like not only is the F2 handler being ignored, the F1 handler is as well
Additional information
Maybe this is intentional to help with debugging?
I can see why you would probably want a non-custom error if there's an error in your prepareStackTrace by default, but it would be really nice if a new prepareStackTrace handler was honored if set.
Maybe?
The text was updated successfully, but these errors were encountered:
Version
v20.8.1
Platform
Subsystem
Error
What steps will reproduce the bug?
Run
How often does it reproduce? Is there a required condition?
This will repro 100% of the time
What is the expected behavior? Why is that the expected behavior?
We should see
Inside the f1 handler, we set Error.prepareStackTrace. It makes sense that the original error (
e1
) isn't affected, since it's already being handled, bute2
should use the newest Error.prepareStackTrace function.What do you see instead?
So it looks like not only is the
F2
handler being ignored, theF1
handler is as wellAdditional information
Maybe this is intentional to help with debugging?
I can see why you would probably want a non-custom error if there's an error in your prepareStackTrace by default, but it would be really nice if a new prepareStackTrace handler was honored if set.
Maybe?
The text was updated successfully, but these errors were encountered: