UNPKG

@acruzjr/express-http-errors

Version:
24 lines 573 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HttpError = void 0; class HttpError extends Error { constructor(message, error) { super(message); this.message = message; this.error = error; } send(res) { res.status(this.status).send({ code: this.status, message: this.message, error: this.error, }); } postBuild() { /** * nothing todo */ } } exports.HttpError = HttpError; //# sourceMappingURL=HttpError.js.map