Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

drboom-tedius

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

drboom-tedius

Catches tedious errors and converts them into Hapi Boom errors.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

Dr. Boom: Seaquell

npm i drboom-tedious

Auto-cast errors from tedious into Hapi HTTP Errors.

##Example / Boilerplate

Plugin registration boilerplate:

var hapi = require('hapi');
var config = require('./config.json');
var Boom = require('boom');

var server = new hapi.Server();
server.connection(config);

server.register([{
    register: require('drboom')(),
    options: {
        plugins: [require('drboom-tedious')()]
    },
}, function (err) {
    server.log(['startup'], 'Loaded pgboom plugin');
    server.start(function (err) {
        //...
    }
});

Now, you can pass your tedious errors right on through to hapi reply!

function someHandler(request, reply) {
    mssql.query("some query", reply);
});

Keywords

drboom

FAQs

Package last updated on 10 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts