From 694f1ba4f5780b2e9821db52e579883bbc289df4 Mon Sep 17 00:00:00 2001 From: Jonathan Bennetts Date: Fri, 7 Oct 2022 18:10:28 +0100 Subject: [PATCH] fix(Github Trigger Node): Fix issue with trigger not always activating (#4284) --- packages/nodes-base/nodes/Github/GithubTrigger.node.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nodes-base/nodes/Github/GithubTrigger.node.ts b/packages/nodes-base/nodes/Github/GithubTrigger.node.ts index 13ae1d960e..1d059160d9 100644 --- a/packages/nodes-base/nodes/Github/GithubTrigger.node.ts +++ b/packages/nodes-base/nodes/Github/GithubTrigger.node.ts @@ -363,7 +363,7 @@ export class GithubTrigger implements INodeType { try { await githubApiRequest.call(this, 'GET', endpoint, {}); } catch (error) { - if (error.httpCode === '404') { + if (error.cause.httpCode === '404') { // Webhook does not exist delete webhookData.webhookId; delete webhookData.webhookEvents; @@ -412,7 +412,7 @@ export class GithubTrigger implements INodeType { try { responseData = await githubApiRequest.call(this, 'POST', endpoint, body); } catch (error) { - if (error.httpCode === '422') { + if (error.cause.httpCode === '422') { // Webhook exists already // Get the data of the already registered webhook