Report errors to Sentry


0.2.23 years ago3 years agoMinified + gzip package size for @ansaro/errors in KB



Report errors to Sentry

yarn add @ansaro/errors


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"

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.