3.5.1 • Published 4 years ago
@sanar/error-handler v3.5.1
Use
import SER from '@sanar/error-handler';
const confSentry: IConfigSentryInit = {
dsn:
'https://VALID_NUMEBER_DSR@.sentry.io/9982828',
environment: 'production',
isToSend: true, // Send to Sentry
scopeDefault: {
namePackage: require(`${__dirname}/../package.json`).name,
release: require(`${__dirname}/../package.json`).version, // change to get the version
},
};
SER.init(confSentry);
SER.report(
new Error('ERROR on Sentry'),
contextError,
);
License
See the LICENSE file for details.