diff --git a/runtimes/nodejs/src/support/init-hook.ts b/runtimes/nodejs/src/support/init-hook.ts index 6ca91dbe66..05071ff83c 100644 --- a/runtimes/nodejs/src/support/init-hook.ts +++ b/runtimes/nodejs/src/support/init-hook.ts @@ -12,7 +12,7 @@ export class InitHook { return } const executor = new FunctionExecutor(func) - await executor.invoke( + const result = await executor.invoke( { method: 'INIT', __function_name: func.name, @@ -20,6 +20,10 @@ export class InitHook { false, ) + if (result.error) { + return logger.error(result.error) + } + logger.info('__init__ hook invoked') } }