mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
🐛 Fix bug with test webhooks which do not get unregistered
This commit is contained in:
@@ -53,7 +53,15 @@ export class ActiveWebhooks {
|
||||
const webhookExists = await workflow.runWebhookMethod('checkExists', webhookData, NodeExecuteFunctions, mode, this.testWebhooks);
|
||||
if (webhookExists === false) {
|
||||
// If webhook does not exist yet create it
|
||||
await workflow.runWebhookMethod('create', webhookData, NodeExecuteFunctions, mode, this.testWebhooks);
|
||||
try {
|
||||
await workflow.runWebhookMethod('create', webhookData, NodeExecuteFunctions, mode, this.testWebhooks);
|
||||
} catch (error) {
|
||||
// If there was a problem unregister the webhook again
|
||||
delete this.webhookUrls[webhookKey];
|
||||
delete this.workflowWebhooks[webhookData.workflowId];
|
||||
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
this.workflowWebhooks[webhookData.workflowId].push(webhookData);
|
||||
|
||||
Reference in New Issue
Block a user