Skip to content

Commit

Permalink
fix(Github Trigger Node): Fix issue with trigger not always activating (
Browse files Browse the repository at this point in the history
  • Loading branch information
Joffcom authored Oct 7, 2022
1 parent d36e920 commit 694f1ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/nodes-base/nodes/Github/GithubTrigger.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 694f1ba

Please sign in to comment.