Custom Node.js errors for REST API
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')
MIT
| Name | Name | Last commit date | ||
|---|---|---|---|---|