diff --git a/packages/nocodb/src/lib/noco/meta/helpers/webhookHelpers.ts b/packages/nocodb/src/lib/noco/meta/helpers/webhookHelpers.ts index dfdbdade0c..491f82d44b 100644 --- a/packages/nocodb/src/lib/noco/meta/helpers/webhookHelpers.ts +++ b/packages/nocodb/src/lib/noco/meta/helpers/webhookHelpers.ts @@ -291,10 +291,12 @@ export async function invokeWebhook( }; if (throwErrorOnFailure) throw e; } finally { - hookLog.execution_time = parseHrtimeToMilliSeconds( - process.hrtime(startTime) - ); - if (hookLog) HookLog.insert({ ...hookLog, test_call: !!testFilters }); + if (hookLog) { + hookLog.execution_time = parseHrtimeToMilliSeconds( + process.hrtime(startTime) + ); + HookLog.insert({ ...hookLog, test_call: !!testFilters }); + } } }