diff --git a/packages/cli/src/WebhookHelpers.ts b/packages/cli/src/WebhookHelpers.ts index 7b1e0b650b..b0e3844ceb 100644 --- a/packages/cli/src/WebhookHelpers.ts +++ b/packages/cli/src/WebhookHelpers.ts @@ -551,6 +551,7 @@ export async function executeWebhook( if (returnData.data!.main[0]![0] === undefined) { responseCallback(new Error('No item to return got found.'), {}); didSendResponse = true; + return undefined; } data = returnData.data!.main[0]![0].json; @@ -602,11 +603,13 @@ export async function executeWebhook( if (data === undefined) { responseCallback(new Error('No item to return got found.'), {}); didSendResponse = true; + return undefined; } if (data.binary === undefined) { responseCallback(new Error('No binary data to return got found.'), {}); didSendResponse = true; + return undefined; } const responseBinaryPropertyName = workflow.expression.getSimpleParameterValue(