From 86572fc4f7337935e9cf8e4f6e8386fb4af2460f Mon Sep 17 00:00:00 2001 From: Marcus Date: Thu, 20 Jul 2023 13:31:49 +0200 Subject: [PATCH 1/2] fix webhook checkExists not deleting static data --- packages/nodes-base/nodes/Gitlab/GitlabTrigger.node.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nodes-base/nodes/Gitlab/GitlabTrigger.node.ts b/packages/nodes-base/nodes/Gitlab/GitlabTrigger.node.ts index 910759349463a..7137526b4296f 100644 --- a/packages/nodes-base/nodes/Gitlab/GitlabTrigger.node.ts +++ b/packages/nodes-base/nodes/Gitlab/GitlabTrigger.node.ts @@ -195,7 +195,7 @@ export class GitlabTrigger implements INodeType { try { await gitlabApiRequest.call(this, 'GET', endpoint, {}); } catch (error) { - if (error.cause.httpCode === '404') { + if (error.description.includes('404')) { // Webhook does not exist delete webhookData.webhookId; delete webhookData.webhookEvents; From b4a53dede28d89d9245085b26c17d4390afe85f8 Mon Sep 17 00:00:00 2001 From: Marcus Date: Fri, 21 Jul 2023 11:35:31 +0200 Subject: [PATCH 2/2] improve webhook checkExists not deleting static data --- packages/nodes-base/nodes/Gitlab/GitlabTrigger.node.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nodes-base/nodes/Gitlab/GitlabTrigger.node.ts b/packages/nodes-base/nodes/Gitlab/GitlabTrigger.node.ts index 7137526b4296f..3b781ed8053a7 100644 --- a/packages/nodes-base/nodes/Gitlab/GitlabTrigger.node.ts +++ b/packages/nodes-base/nodes/Gitlab/GitlabTrigger.node.ts @@ -195,7 +195,7 @@ export class GitlabTrigger implements INodeType { try { await gitlabApiRequest.call(this, 'GET', endpoint, {}); } catch (error) { - if (error.description.includes('404')) { + if (error.cause.httpCode === '404' || error.description.includes('404')) { // Webhook does not exist delete webhookData.webhookId; delete webhookData.webhookEvents;