mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 12:44:07 -08:00
fix(GitLab Trigger Node): fix issue with trigger not always activating (#4303)
This commit is contained in:
parent
aa6c786041
commit
2e916b6564
|
@ -6,7 +6,6 @@ import {
|
||||||
INodeTypeDescription,
|
INodeTypeDescription,
|
||||||
IWebhookResponseData,
|
IWebhookResponseData,
|
||||||
NodeApiError,
|
NodeApiError,
|
||||||
NodeOperationError,
|
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
import { gitlabApiRequest } from './GenericFunctions';
|
import { gitlabApiRequest } from './GenericFunctions';
|
||||||
|
@ -196,7 +195,7 @@ export class GitlabTrigger implements INodeType {
|
||||||
try {
|
try {
|
||||||
await gitlabApiRequest.call(this, 'GET', endpoint, {});
|
await gitlabApiRequest.call(this, 'GET', endpoint, {});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.httpCode === '404') {
|
if (error.cause.httpCode === '404') {
|
||||||
// Webhook does not exist
|
// Webhook does not exist
|
||||||
delete webhookData.webhookId;
|
delete webhookData.webhookId;
|
||||||
delete webhookData.webhookEvents;
|
delete webhookData.webhookEvents;
|
||||||
|
|
Loading…
Reference in a new issue