From e438564177dff656ed39a84e613f02ee48b2611d Mon Sep 17 00:00:00 2001 From: HerrHase Date: Fri, 10 Jan 2025 17:27:12 +0100 Subject: [PATCH] bugfix for resolving a action class, handle errors and write to log --- packages/runner/_run.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/runner/_run.ts b/packages/runner/_run.ts index da5846a..1d8aba5 100644 --- a/packages/runner/_run.ts +++ b/packages/runner/_run.ts @@ -29,8 +29,15 @@ async function run(config: object) { for (const actionConfig of config.actions) { + let ActionClass + // resolve action class - const ActionClass = await import(resolveActionClass(actionConfig.class)) + try { + ActionClass = await import(resolveActionClass(actionConfig.class)) + } catch(error) { + logger(config.slug).error('runner / resolve action class / ' + error) + continue + } // options are exists, add to docket if (actionConfig.hasOwnProperty('options')) {