Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/node
SDK Version
7.36.0
SDK Setup
See below.
Steps to Reproduce
Given running the following script with node index.mjs
:
// index.mjs
import Sentry from '@sentry/node';
import { ExtraErrorData } from '@sentry/integrations';
Sentry.init({
dsn: process.env.SENTRY_DSN,
integrations: [
new ExtraErrorData(),
],
});
function lower() {
const err = new Error('lower');
err.lowerFoo = 'baz';
throw err;
}
function upper() {
try {
lower();
} catch (lowerErr) {
const err = new Error('upper', { cause: lowerErr });
err.upperFoo = 'bar';
console.error(err);
throw err;
}
}
upper();
Expected Result
As the errors are linked, I'd expect to see the extra data for both.
Actual Result
I can only see extra data for the upper error:
, although lowerFoo: 'baz'
shows in the console.log()
breadcrumb: