0.0.2 • Published 7 years ago
micro-raven v0.0.2
micro-raven
A simple wrapper around raven client.
Usage
const microRaven = require('micro-raven')
const Raven = require('raven')
// Create your own client
const client = Raven.config("__SDN__").install({ unhandledRejection: true })
const handler = async (req, res) => {
throw new Error('Ooops!')
}
module.exports = microRaven(client)(handler)
or
const microRaven = require('micro-raven')
const handler = async (req, res) => {
throw new Error('Ooops!')
}
// Just pass the sdn and micro-raven will create the client
module.exports = microRaven("__SDN__")(handler)