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
{{ message }}
Repository navigation
v8 error taming should leverage prepareStackTrace #1798
Error.prepareStackTrace can be used by Node.js to apply source maps to the captured stack trace. However SES sets its own prepareStackTrace during v8 Error taming. Instead of completely discarding it. Maybe instead it should leverage as much as possible the existing prepareStackTrace to prepare its own stack strings?
Furthermore, if the start compartment set a prepareStackTrace after lockdown, it seems the returned value will be used for the .stack property instead of the empty string, even if errorTaming is set to 'safe':
None particularly. The start compartment is already in position to decide how lockdown should tame errors, and can also set prepareStackTrace after lockdown
Scaling Considerations
None
Test Plan
load some minified source which throws errors in Node.js with --use-source-maps and verify stack traces are mapped.
Activity
erights commentedon Jul 12, 2024
Hi @mhofman , I've co-assigned myself to this.
mhofman commentedon Jul 12, 2024
I believe I explored this, and that didn't work
fix(ses): work around #2348 linenumber bug (#2355)
mhofman commentedon Sep 15, 2025
It looks like since I filed this issue, Node.js actually decided to expose their internal
prepareStackTrace, which should make this very straightforward.erights commentedon Sep 16, 2025
Huh. Testing just now, it was added sometime between Node v18.19.0 exclusive and Node v20.18.3 inclusive.