npm.io
1.0.1 • Published 10 years ago

html-errors

Licence
MIT
Version
1.0.1
Deps
0
Vulns
0
Weekly
0

html-errors

Custom Node.js errors for REST API

Usage

First install the package:

npm i html-errors --save

Then require it in the code:

let errors = require('html-errors')

then use it to throw errors:

throw new errors.BadRequest('Invalid email')

License

MIT