From b3bf6f04b8f00a86392b69c8092c350f43e43cf0 Mon Sep 17 00:00:00 2001 From: Ben Hesseldieck Date: Fri, 15 Jan 2021 16:50:27 +0100 Subject: [PATCH] :zap: add error message for dynamic webhook-test --- packages/core/src/ActiveWebhooks.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/core/src/ActiveWebhooks.ts b/packages/core/src/ActiveWebhooks.ts index fc1b98ab47..bd8248dc8f 100644 --- a/packages/core/src/ActiveWebhooks.ts +++ b/packages/core/src/ActiveWebhooks.ts @@ -39,6 +39,9 @@ export class ActiveWebhooks { //check that there is not a webhook already registed with that path/method if (this.webhookUrls[webhookKey] !== undefined) { + if (webhookData.webhookId) { + throw new Error(`Test-Webhook "${webhookData.node}" can not be activated! Please duplicate "${webhookData.node}" and delete the currently existing one.`); + } throw new Error(`Test-Webhook can not be activated because another one with the same method "${webhookData.httpMethod}" and path "${webhookData.path}" is already active!`); }