Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private captureException(scope: Scope, exception): void {
if (this.options.level) scope.setLevel(this.options.level);
if (this.options.fingerprint) scope.setFingerprint(this.options.fingerprint);
if (this.options.extra) for (const key in this.options.extra) {
if(this.options.extra.hasOwnProperty(key)) scope.setExtra(key, this.options.extra[key]);
}
for (const tag in this.options.tags) {
scope.setTag(tag, this.options.tags[tag])
}
Sentry.captureException(exception);
}
Sentry.withScope(scope => {
scope.setExtras(e.details);
scope.setExtras({ uploadOptions: options, storeOptions });
Sentry.captureException(e);
});
public handler(event: PromiseRejectionEvent): void {
captureException(event.reason);
}
/**