-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Package: coreIssues related to the Sentry Core SDKIssues related to the Sentry Core SDK
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.23.0
Framework Version
v18.9.0
Link to Sentry event
No response
Steps to Reproduce
- Record an exception via
Sentry.captureException - Observe return result (
00000000....)
The problem is with baseclient.js:96
/**
* @inheritDoc
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
captureException(exception, hint, scope) {
// ensure we haven't captured this very object before
if (utils.checkOrSetAlreadyCaught(exception)) {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.log(ALREADY_SEEN_ERROR);
return;
}
let eventId;
this._process(
this.eventFromException(exception, hint)
.then(event => this._captureEvent(event, hint, scope))
.then(result => {
eventId = result; <===== it runs second after function exits.
}),
);
return eventId; <===== It runs first. And this value is used in hub.js captureException
}Expected Result
Event ID
Actual Result
Undefined which is mapped to 000000...
Metadata
Metadata
Assignees
Labels
Package: coreIssues related to the Sentry Core SDKIssues related to the Sentry Core SDK