node package manager

Introducing npm Enterprise add-ons. Integrate third-party dev tools into npm…

web-error

Extended class of javascript Error with support for http status code

Web Error

Custom error object with code of http error

Example

var WebError = require('web-error');

var error = new WebError(404);

(error instanceof Error).should.equal(true);
(error instanceof WebError).should.equal(true);