🐛 Fix bug with activating some trigger nodes #1715

This commit is contained in:
Jan Oberhauser 2021-04-30 21:12:11 -05:00
parent ab1c8037de
commit 9a7de7d077
3 changed files with 4 additions and 4 deletions

View file

@ -180,7 +180,7 @@ export class GetResponseTrigger implements INodeType {
}
}
} catch (error) {
if (error.message.includes('[404]')) {
if (error.httpCode === '404') {
return false;
}
}

View file

@ -353,7 +353,7 @@ export class GithubTrigger implements INodeType {
try {
await githubApiRequest.call(this, 'GET', endpoint, {});
} catch (error) {
if (error.message.includes('[404]:')) {
if (error.httpCode === '404') {
// Webhook does not exist
delete webhookData.webhookId;
delete webhookData.webhookEvents;
@ -399,7 +399,7 @@ export class GithubTrigger implements INodeType {
try {
responseData = await githubApiRequest.call(this, 'POST', endpoint, body);
} catch (error) {
if (error.message.includes('[422]:')) {
if (error.httpCode === '422') {
// Webhook exists already
// Get the data of the already registered webhook

View file

@ -179,7 +179,7 @@ export class GitlabTrigger implements INodeType {
try {
await gitlabApiRequest.call(this, 'GET', endpoint, {});
} catch (error) {
if (error.message.includes('[404]:')) {
if (error.httpCode === '404') {
// Webhook does not exist
delete webhookData.webhookId;
delete webhookData.webhookEvents;