corgi/src/common/ZError.ts
2021-04-19 18:06:36 +08:00

15 lines
302 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;
}
}