Skip to content

Return a promise from the main API capture* methods #2049

@rhyek

Description

@rhyek

Is this guaranteed to report the exception to Sentry?

try {
  // code
} catch (e) {
  const eventId = Sentry.captureException(e);
  console.log('sentry event', eventId);
  process.exit(1);
}

The documentation is not clear if the event id is generated locally or remotely. Is draining relevant at all? https://docs.sentry.io/error-reporting/configuration/draining/?platform=node

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions