@minimaltech/node-infra
Version:
Minimal Technology NodeJS Infrastructure - Loopback 4 Framework
18 lines • 580 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getError = exports.ApplicationError = void 0;
class ApplicationError extends Error {
constructor(opts) {
const { message, messageCode, statusCode = 400 } = opts;
super(message);
this.statusCode = statusCode;
this.messageCode = messageCode;
}
}
exports.ApplicationError = ApplicationError;
const getError = (opts) => {
const error = new ApplicationError(opts);
return error;
};
exports.getError = getError;
//# sourceMappingURL=error.utility.js.map