mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-02 17:09:30 +08:00
13 lines
336 B
Text
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
|
|
}
|
|
}
|