Skip to content
This repository was archived by the owner on May 23, 2019. It is now read-only.

scttcper/koa2-raven

 
 

Repository files navigation

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:[email protected]/269')
  .install({ unhandledRejection: true });

koaRaven(app, client);

app.use(() => {
  // This will log in sentry
  throw new Error('Terrible Error');
});

app.listen(3000);

About

raven middleware for koa v2

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%