🐛 Allow Stripe Webhook creation if old does not exist anymore #2429

This commit is contained in:
Jan Oberhauser 2021-11-13 10:54:14 +01:00
parent 345c94bd37
commit 8427ade2e6

View file

@ -820,7 +820,7 @@ export class StripeTrigger implements INodeType {
try {
await stripeApiRequest.call(this, 'GET', endpoint, {});
} catch (error) {
if (error.message.includes('resource_missing')) {
if (error.httpCode === '404' || error.message.includes('resource_missing')) {
// Webhook does not exist
delete webhookData.webhookId;
delete webhookData.webhookEvents;