@neylion/exceptions
Version:
Exceptions commonly used within ney projects
16 lines (15 loc) • 623 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const Exception_1 = require("./Exception");
class BusinessRuleException extends Exception_1.Exception {
constructor(message, errorCode, innerException) {
super(message, innerException);
this.name = "BusinessRuleException";
this.errorCode = errorCode ? Number(errorCode) : undefined;
this.statusCode = 400;
this.type = "businessRule";
this.typeDescription = "Request conflicted with a business rule.";
delete this.location;
}
}
exports.BusinessRuleException = BusinessRuleException;