Open
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 SDK are you using?
@sentry/browser
SDK Version
7.91.0
Framework Version
No response
Link to Sentry event
No response
SDK Setup
No response
Steps to Reproduce
function foo () {
const rejections = [new Error('Message 1'), new Error('Message 2'), new Error('Message 3')]
throw new AggregateError(rejections, 'wat')
}
try {
foo()
} catch(e) {
Sentry.captureException(e)
}
Expected Result
When creating a new AggregateError
instance, it accepts an optional 2nd argument, which should be used as the error message per https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-aggregate-error
Currently LinkedErrors
will ignore that property and use the message from the first child instead.
In the case above, wat
should be the message for the root error.
Actual Result
First child error is used as the source of the message.
Metadata
Metadata
Assignees
Type
Projects
Status
No status
Status
No status