It seems that with the release of 3.20.0, the new Error cause support is overwriting the global Error object with one from this module. This is in order to support the new options argument to the constructor for cause support. The downside is there are a few "magical" properties on the Error object that provide some stack trace APIs like Error.stackTraceLimit and Error.prepareStackTrace. There are modules like https://www.npmjs.com/package/stack-trace and it's 737 dependents that end up with unexpected behavior when the case is being polyfilled.
That basically proxies the two properties back to the original Error object which v8 then is able to read when it performs the stack trace generation logic.
I'm not sure that is the full fix (like Object.defineProperties should probably use the impl that is in this module, it needs tests probably, etc.), but I just wanted to open this issue at least for now as I recently sustained a bad injury that makes typing quite painful at the moment. Perhaps someone will be gracious enough to develop a fix while I rest and heal.
Thanks for reading.
The text was updated successfully, but these errors were encountered:
we had some errors on our sentry(timeouts, etc.) but after upgrading to firstname.lastname@example.org (from core-js2) we're getting the same errors wrapped in apply(core-js/internals/wrap-error-constructor-with-cause).
I thought this issue is similar to ours, so I wanted to ask it here.
thanks in advance. @zloirock