@sanar/error-handler

3.5.1 • Public • Published

TypeScript version Node.js version APLv2 Build Status Quality Gate Status

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.

Package Sidebar

Install

npm i @sanar/error-handler

Weekly Downloads

8

Version

3.5.1

License

MIT

Unpacked Size

17.3 kB

Total Files

12

Last publish

Collaborators

  • sanar