# @ansaro/errors

> Report errors to Sentry

Latest version **0.2.2** (published 2018-07-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install @ansaro/errors
pnpm add @ansaro/errors
yarn add @ansaro/errors
bun add @ansaro/errors
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2018-07-25 |
| First published | 2018-07-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | bgoldberg15, maxbeatty |

## Links

- npm: https://www.npmjs.com/package/@ansaro/errors
- npm.io page: https://npm.io/package/@ansaro/errors

## Dependencies (1)

- [raven](https://npm.io/package/raven.md) ^2.6.3

## Recent versions

- 0.2.2 (latest) — 2018-07-25
- 0.2.1 — 2018-07-14
- 0.2.0 — 2018-07-13
- 0.1.1 — 2018-07-05

## README

# Errors

Report errors to [Sentry](https://sentry.io)

```
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](https://docs.sentry.io/clients/node/config/#optional-settings)

```js
const { reportError } = require("@ansaro/errors");

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

---
_Source: https://npm.io/package/@ansaro/errors · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
