🐛 Fix bug in Stripe Trigger Node with existing webhooks

This commit is contained in:
Jan Oberhauser
2020-12-28 17:57:19 +01:00
parent 3c67ac5a52
commit 1d2c286b88

View File

@@ -818,7 +818,7 @@ export class StripeTrigger implements INodeType {
try { try {
await stripeApiRequest.call(this, 'GET', endpoint, {}); await stripeApiRequest.call(this, 'GET', endpoint, {});
} catch (e) { } catch (e) {
if (e.message.includes('[404]:')) { if (e.message.includes('resource_missing')) {
// Webhook does not exist // Webhook does not exist
delete webhookData.webhookId; delete webhookData.webhookId;
delete webhookData.webhookEvents; delete webhookData.webhookEvents;