Skip to content

Commit

Permalink
fix(runtime): print error when invoke init function error (#1887)
Browse files Browse the repository at this point in the history
  • Loading branch information
0fatal committed Mar 7, 2024
1 parent bc948e2 commit fbfa762
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion runtimes/nodejs/src/support/init-hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@ export class InitHook {
return
}
const executor = new FunctionExecutor(func)
await executor.invoke(
const result = await executor.invoke(
{
method: 'INIT',
__function_name: func.name,
},
false,
)

if (result.error) {
return logger.error(result.error)
}

logger.info('__init__ hook invoked')
}
}

0 comments on commit fbfa762

Please sign in to comment.