api-error-class
v1.0.3
Published
Class for handling HTTP errors.
Downloads
29
Readme
Install:
$ npm i api-error-class
Example create and return error:
const APIError = require("api-error-class");
const someController = (req, res) => {
//...some kind of functional
throw new APIError("Message", 401);
};