1.0.3 • Published 5 years ago
api-error-class v1.0.3
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);
};