mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
🐛 Fix bug with activating some trigger nodes #1715
This commit is contained in:
parent
ab1c8037de
commit
9a7de7d077
|
@ -180,7 +180,7 @@ export class GetResponseTrigger implements INodeType {
|
|||
}
|
||||
}
|
||||
} catch (error) {
|
||||
if (error.message.includes('[404]')) {
|
||||
if (error.httpCode === '404') {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue