Urara-Blog/node_modules/.pnpm-store/v3/files/31/50e39ef9272cd46979d998ba9c8faebc8fa032ea0796ed8207eac81a2cf901f99abd605bb7c8a6a55379f95f1d973b88fac448fd98fd32ca65cf16efdb23aa
2022-08-14 01:14:53 +08:00

13 lines
336 B
Text

import type {ErrorObject} from "../types"
export default class ValidationError extends Error {
readonly errors: Partial<ErrorObject>[]
readonly ajv: true
readonly validation: true
constructor(errors: Partial<ErrorObject>[]) {
super("validation failed")
this.errors = errors
this.ajv = this.validation = true
}
}