# paperplane-bugsnag

> A bugsnag wrapper for paperplane

Latest version **0.2.0** (published 2019-09-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install paperplane-bugsnag
pnpm add paperplane-bugsnag
yarn add paperplane-bugsnag
bun add paperplane-bugsnag
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2019-09-03 |
| First published | 2018-08-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | articulate |
| Maintainers | flintinatux |
| Keywords | bugsnag, error, exception, notifier, paperplane |

## Links

- npm: https://www.npmjs.com/package/paperplane-bugsnag
- Repository: https://github.com/articulate/paperplane-bugsnag
- Homepage: https://github.com/articulate/paperplane-bugsnag#readme
- Issues: https://github.com/articulate/paperplane-bugsnag/issues
- npm.io page: https://npm.io/package/paperplane-bugsnag

## Dependencies (2)

- [ramda](https://npm.io/package/ramda.md) ^0.25.0
- [paperplane](https://npm.io/package/paperplane.md) 2.x

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@technik-sde/prosemirror-recreate-transform](https://npm.io/package/@technik-sde/prosemirror-recreate-transform.md) — 1.5K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads

## Recent versions

- 0.2.0 (latest) — 2019-09-03
- 0.1.0 — 2019-08-13
- 0.0.1 — 2018-08-31

## README

<h1 align="center">
  paperplane-bugsnag
</h1>
<p align="center">
  A <a href="https://github.com/bugsnag/bugsnag-node"><code>bugsnag</code></a> wrapper for <a href="https://github.com/articulate/paperplane"><code>paperplane</code></a>.
</p>
<p align="center">
  <a href="https://www.npmjs.com/package/paperplane-bugsnag"><img src="https://img.shields.io/npm/v/paperplane-bugsnag.svg" alt="npm version" style="max-width:100%;"></a> <a href="https://www.npmjs.com/package/paperplane-bugsnag"><img src="https://img.shields.io/npm/dm/paperplane-bugsnag.svg" alt="npm downloads" style="max-width:100%;"></a> <a href="https://travis-ci.org/articulate/paperplane-bugsnag"><img src="https://travis-ci.org/articulate/paperplane-bugsnag.svg?branch=master" alt="Build Status" style="max-width:100%;"></a> <a href='https://coveralls.io/github/articulate/paperplane-bugsnag?branch=v2'><img src='https://coveralls.io/repos/github/articulate/paperplane-bugsnag/badge.svg?branch=v2' alt='Coverage Status' /></a>
</p>

<p align="center">
  Filters `Boom` client errors (4xx) and `Joi` validation errors, and adds request data to the error notification for debugging.
</p>

## Usage

Setup your `bugsnag` like this:

```js
// server/lib/bugsnag.js

const bugsnag = require('bugsnag')

const bugsnagClient = bugsnag({
  apiKey: process.env.BUGSNAG_API_KEY,
  notifyReleaseStages: ['prod', 'stage'],
  releaseStage: process.env.SERVICE_ENV
})

module.exports = require('paperplane-bugsnag')(bugsnagClient)
```

Then use it as the `cry` option in `paperplane` like this:

```js
// server/index.js

const http = require('http')
const { mount } = require('paperplane')

const app = require('./rest')
const cry = require('./lib/bugsnag').notify

http.createServer(mount({ app, cry })).listen(3000, cry)
```

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