UNPKG

@coko/server

Version:

Reusable server for use by Coko's projects

15 lines 531 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const http_status_codes_1 = require("http-status-codes"); class ValidationError extends Error { status; constructor(message, status) { super(message); Error.captureStackTrace(this, ValidationError); this.name = 'ValidationError'; this.message = message; this.status = status || http_status_codes_1.StatusCodes.CONFLICT; } } exports.default = ValidationError; //# sourceMappingURL=ValidationError.js.map