From 8935eaec3ba813f5f27ca1de4cd7df71f3d85663 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 11 Nov 2022 16:55:16 +0900 Subject: [PATCH] Update QueueProcessorService.ts --- .../backend/src/queue/QueueProcessorService.ts | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/backend/src/queue/QueueProcessorService.ts b/packages/backend/src/queue/QueueProcessorService.ts index a4879cef3d..8c300d479c 100644 --- a/packages/backend/src/queue/QueueProcessorService.ts +++ b/packages/backend/src/queue/QueueProcessorService.ts @@ -37,11 +37,19 @@ export class QueueProcessorService { public start() { function renderError(e: Error): any { - return { - stack: e.stack, - message: e.message, - name: e.name, - }; + if (e) { // 何故かeがundefinedで来ることがある + return { + stack: e.stack, + message: e.message, + name: e.name, + }; + } else { + return { + stack: '?', + message: '?', + name: '?', + }; + } } const systemLogger = this.logger.createSubLogger('system');