Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function notifySentryGlobal(ctx) {
if (!raven.dsn) {
log.info('Does not have global sentry');
return;
}
ctx.event_id = raven.generateEventId();
raven.send(ctx, (publishErr) => {
if (publishErr) {
log.error('Failed to publish error into global sentry: %s', publishErr.message);
return;
}
log.info('Published in global sentry');
});
}