From d7c6833dc38c1556e2e81db808333f9960876259 Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Mon, 30 May 2022 12:05:43 +0200 Subject: [PATCH] refactor(core): Improve error message --- packages/cli/commands/worker.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/cli/commands/worker.ts b/packages/cli/commands/worker.ts index 020e25c28f..424d5c71b0 100644 --- a/packages/cli/commands/worker.ts +++ b/packages/cli/commands/worker.ts @@ -122,10 +122,15 @@ export class Worker extends Command { const executionDb = await Db.collections.Execution.findOne(jobData.executionId); if (!executionDb) { - LoggerProxy.error('Worker failed to find execution data in database. Cannot continue.', { - executionId: jobData.executionId, - }); - throw new Error('Unable to find execution data in database. Aborting execution.'); + LoggerProxy.error( + `Worker failed to find data of execution "${jobData.executionId}" in database. Cannot continue.`, + { + executionId: jobData.executionId, + }, + ); + throw new Error( + `Unable to find data of execution "${jobData.executionId}" in database. Aborting execution.`, + ); } const currentExecutionDb = ResponseHelper.unflattenExecutionData(executionDb); LoggerProxy.info(