boomify
A simple higher order component to handle errors using boom and express.
Installation
$ npm install --save boomify
Usage
var app = ;var boom = ;var boomify = ; var ctrl = res iferr // boomify will convert this to the appropriate response object return res; resstatus200; res; ; // boomify whole ctrlapp; // boomify a single method;app; // will convert boom.notFound to res.error(404); res.send(err.output.payload);
Tests
mocha test
License
Apache-2.0 © blugavere