fix(GitLab Trigger Node): fix issue with trigger not always activating (#4303)

This commit is contained in:
Jonathan Bennetts 2022-10-11 08:50:23 +01:00 committed by GitHub
parent aa6c786041
commit 2e916b6564
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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