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
This commit is contained in:
@@ -18,7 +18,7 @@ export function createTempDir(): Promise<[string, () => void]> {
|
||||
(e, path, cleanup) => {
|
||||
if (e) return rej(e);
|
||||
res([path, cleanup]);
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
|
11
packages/backend/src/misc/fastify-reply-error.ts
Normal file
11
packages/backend/src/misc/fastify-reply-error.ts
Normal file
@@ -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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user