@travetto/schema
Advanced tools
Comparing version 4.0.0 to 4.0.1
{ | ||
"name": "@travetto/schema", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Data type registry for runtime validation, reflection and binding.", | ||
@@ -30,6 +30,6 @@ "keywords": [ | ||
"dependencies": { | ||
"@travetto/registry": "^4.0.0" | ||
"@travetto/registry": "^4.0.1" | ||
}, | ||
"peerDependencies": { | ||
"@travetto/transformer": "^4.0.0" | ||
"@travetto/transformer": "^4.0.1" | ||
}, | ||
@@ -36,0 +36,0 @@ "peerDependenciesMeta": { |
@@ -9,4 +9,4 @@ import { Class, AppError } from '@travetto/base'; | ||
*/ | ||
export class ValidationResultError extends AppError { | ||
constructor(public errors: ValidationError[]) { | ||
export class ValidationResultError extends AppError<{ errors: ValidationError[] }> { | ||
constructor(errors: ValidationError[]) { | ||
super('Validation errors have occurred', 'data', { errors }); | ||
@@ -13,0 +13,0 @@ } |
@@ -314,5 +314,5 @@ import { Class, ClassInstance, TypedObject, ObjectUtil } from '@travetto/base'; | ||
if (err instanceof ValidationResultError) { // Don't check required fields | ||
const errs = err.errors.filter(x => x.kind !== 'required'); | ||
const errs = err.details!.errors.filter(x => x.kind !== 'required'); | ||
if (errs.length) { | ||
err.errors = errs; | ||
err.details!.errors = errs; | ||
throw err; | ||
@@ -319,0 +319,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
102009
Updated@travetto/registry@^4.0.1