Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
hub.withScope((scope: Scope) => {
scope.setLevel(Severity.Fatal);
hub.captureException(error, { originalException: error });
if (!calledFatalError) {
calledFatalError = true;
onFatalError(error);
}
});
} else {
getCurrentHub().withScope(scope => {
if (isFatal) {
scope.setLevel(Severity.Fatal);
}
getCurrentHub().captureException(error, {
originalException: error
});
});