fix(Github Trigger Node): Fix issue with trigger not always activating (#4284)

This commit is contained in:
Jonathan Bennetts 2022-10-07 18:10:28 +01:00 committed by GitHub
parent d36e920997
commit 694f1ba4f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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