14 lines
276 B
TypeScript
14 lines
276 B
TypeScript
import { FastifyError } from 'fastify'
|
|
|
|
export class ZError implements FastifyError {
|
|
code: string
|
|
statusCode?: number
|
|
message: string
|
|
name: string
|
|
|
|
constructor(statusCode: number, message: string) {
|
|
this.statusCode = statusCode
|
|
this.message = message
|
|
}
|
|
}
|