0.1.0 • Published 9 years ago
herror v0.1.0
herror
Simple HTTP error constructor, as if this problem is still open.
Example
var err = herror(403);
err.code
//=> 403
err.message
//=> "403 Forbidden"
err.toString()
//=> "Error: 403 Forbidden"
API
err = herror(code)
Make new error from HTTP status code.
Install
npm install herror
License
MIT
0.1.0
9 years ago