UNPKG

@akrdevtech/lib-express-joi-validation-middleware

Version:
19 lines (18 loc) 617 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BaseError = void 0; const httpStatusCode_1 = require("../enums/httpStatusCode"); class BaseError extends Error { constructor(errorSource, message, stack) { super(message); this.appErr = true; Object.setPrototypeOf(this, BaseError.prototype); this.errors = []; this.source = errorSource; this.statusCode = httpStatusCode_1.HttpStatusCode.INTERNAL_SERVER_ERROR; if (stack) { this.stack = stack; } } } exports.BaseError = BaseError;