Comparing version 4.1.0 to 4.1.1
import { SchemaDef } from './schema-def.js'; | ||
export declare class ValidationError extends Error { | ||
name: string; | ||
status: number; | ||
@@ -4,0 +5,0 @@ details: { |
@@ -5,2 +5,3 @@ export class ValidationError extends Error { | ||
super(); | ||
this.name = this.constructor.name; | ||
this.status = 400; | ||
@@ -10,3 +11,2 @@ const msg = this.formatMessage(errors); | ||
this.message = `${type} validation failed:\n${msg}`; | ||
this.name = 'ValidationError'; | ||
this.details = { | ||
@@ -13,0 +13,0 @@ errors, |
{ | ||
"name": "airtight", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"description": "JSON Schema inspired library for validating and decoding messages", | ||
"type": "module", | ||
"main": "out/main/index.js", | ||
"types": "out/main/index.d.ts", | ||
"exports": { | ||
"import": "./out/main/index.js" | ||
".": "./out/main/index.js" | ||
}, | ||
"main": "out/main/index.js", | ||
"types": "out/main/index.d.ts", | ||
"files": [ | ||
@@ -12,0 +12,0 @@ "out/main/**/*" |
31462
601