mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
fix(Github Trigger Node): Fix issue with trigger not always activating (#4284)
This commit is contained in:
parent
d36e920997
commit
694f1ba4f5
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue