Need private packages and team management tools?Check out npm Orgs. »

koa2-raven

4.1.1 • Public • Published

koa2-raven

NPM version build status coverage status

raven-node middleware for koa v2. Records errors that are thrown from your other middleware and ignores errors that are thrown using ctx.throw.

Install

Install raven > ^1.0.0-beta.1 and koa2-raven

npm i raven@next koa2-raven --save

Usage

const Koa = require('koa');
const Raven = require('raven');
const koaRaven = require('koa2-raven');
 
const app = new Koa();
 
const client = app.context.raven = Raven
  .config('https://public:private@app.getsentry.com/269')
  .install({ unhandledRejection: true });
 
koaRaven(app, client);
 
app.use(() => {
  // This will log in sentry
  throw new Error('Terrible Error');
});
 
app.listen(3000);

Install

npm i koa2-raven

DownloadsWeekly Downloads

108

Version

4.1.1

License

MIT

Unpacked Size

9.95 kB

Total Files

10

Last publish

Collaborators

  • avatar