unleash-server
Version:
Unleash is an enterprise ready feature toggles service. It provides different strategies for handling feature toggles.
26 lines • 776 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
class OwaspValidationError extends Error {
constructor(testResult) {
super(testResult.errors[0]);
Error.captureStackTrace(this, this.constructor);
this.name = this.constructor.name;
this.errors = testResult.errors;
}
toJSON() {
const obj = {
isJoi: true,
name: this.constructor.name,
details: [
{
validationErrors: this.errors,
message: this.errors[0],
},
],
};
return obj;
}
}
exports.default = OwaspValidationError;
module.exports = OwaspValidationError;
//# sourceMappingURL=owasp-validation-error.js.map