@rafat97/exceptionhandler
Version:
All types exception handler classes definition
21 lines • 803 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.JsonSchemaRequestValidationError = void 0;
const CustomError_1 = require("./CustomError");
class JsonSchemaRequestValidationError extends CustomError_1.CustomError {
constructor(message, errors) {
super(message);
this.message = message;
this.errors = errors;
this.statusCode = 400;
Object.setPrototypeOf(this, JsonSchemaRequestValidationError.prototype);
}
getStatusCode() {
return this.statusCode;
}
serializeErrors() {
return { message: this.message, details: this.errors };
}
}
exports.JsonSchemaRequestValidationError = JsonSchemaRequestValidationError;
//# sourceMappingURL=JsonSchemaRequestValidationError.js.map