@nestjs-mod/common
Version:
A collection of utilities for unifying NestJS applications and modules
16 lines • 679 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.EnvModelValidationErrors = void 0;
class EnvModelValidationErrors extends Error {
constructor(errors, info, message) {
super(message ||
Object.entries(info.validations)
.filter(([k, v]) => errors.find((err) => err.property === k))
.map(([k, v]) => `${v.propertyValueExtractors.map((e) => e.example.example)}-${Object.keys(v.constraints).join(',')}`)
.join(';'));
this.errors = errors;
this.info = info;
}
}
exports.EnvModelValidationErrors = EnvModelValidationErrors;
//# sourceMappingURL=errors.js.map