diff --git a/packages/cli/src/TestWebhooks.ts b/packages/cli/src/TestWebhooks.ts index aee337ec74..12ec4a6827 100644 --- a/packages/cli/src/TestWebhooks.ts +++ b/packages/cli/src/TestWebhooks.ts @@ -141,13 +141,13 @@ class TestWebhooks { if (sessionId !== undefined) { push.send('testWebhookReceived', { workflowId, executionId }, sessionId); } - } finally { - // Delete webhook also if an error is thrown - if (timeout) clearTimeout(timeout); - delete testWebhookData[webhookKey]; + } catch {} - await activeWebhooks.removeWorkflow(workflow); - } + // Delete webhook also if an error is thrown + if (timeout) clearTimeout(timeout); + delete testWebhookData[webhookKey]; + + await activeWebhooks.removeWorkflow(workflow); }); }