0.2.2 • Published 4 years ago

@ansaro/errors v0.2.2

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

Errors

Report errors to Sentry

yarn add @ansaro/errors

Usage

Set environment variable SENTRY_DSN to your project's client key (DSN).

reportError is an asynchronous function that takes two arguments:

  1. Error the error to report
  2. options an object of optional settings
const { reportError } = require("@ansaro/errors");

async function() {
  try {
    ...
  } catch(ex) {
    await reportError(ex, {
      tags: {
        service: "name-of-service"
      }
    })
  }
}
0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago