Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
error(error, message = '') {
if (ravenIsAvailable && error instanceof Error) {
Raven.captureException(error);
}
if (
typeof process.env.EPSAGON_TOKEN === 'string'
&& process.env.EPSAGON_TOKEN !== 'undefined'
&& typeof process.env.EPSAGON_SERVICE_NAME === 'string'
&& process.env.EPSAGON_SERVICE_NAME !== 'undefined'
&& error instanceof Error
) {
Epsagon.setError(error);
}
logger.log('error', message, { error });
this.label('error', true);
this.metric('error', 'error', true);
}