From 3a7182bfb5734599321fc03ea77c48b4dbc326d5 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 3 Dec 2022 19:42:05 +0900 Subject: Fastify (#9106) * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * fix * Update SignupApiService.ts * wip * wip * Update ClientServerService.ts * wip * wip * wip * Update WellKnownServerService.ts * wip * wip * update des * wip * Update ApiServerService.ts * wip * update deps * Update WellKnownServerService.ts * wip * update deps * Update ApiCallService.ts * Update ApiCallService.ts * Update ApiServerService.ts --- packages/backend/src/misc/fastify-reply-error.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 packages/backend/src/misc/fastify-reply-error.ts (limited to 'packages/backend/src/misc/fastify-reply-error.ts') diff --git a/packages/backend/src/misc/fastify-reply-error.ts b/packages/backend/src/misc/fastify-reply-error.ts new file mode 100644 index 0000000000..4e987175e2 --- /dev/null +++ b/packages/backend/src/misc/fastify-reply-error.ts @@ -0,0 +1,11 @@ +// https://www.fastify.io/docs/latest/Reference/Reply/#async-await-and-promises +export class FastifyReplyError extends Error { + public message: string; + public statusCode: number; + + constructor(statusCode: number, message: string) { + super(message); + this.message = message; + this.statusCode = statusCode; + } +} -- cgit v1.2.3-freya