http-error-util

0.1.0 • Public • Published

HTTP Error Util

Simple module to generate Error objects with properties:

  • name
  • status
  • message

This makes it extremely easy to plugin into Express' error handling middleware.

Installation

$ npm install http-error-util --save

Example

var httpError = require('http-error-util');
 
new httpError(http.OK, 'OK');

License

MIT

Package Sidebar

Install

npm i http-error-util

Weekly Downloads

2

Version

0.1.0

License

MIT

Last publish

Collaborators

  • elbuo8