mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
🐛 Allow Stripe Webhook creation if old does not exist anymore #2429
This commit is contained in:
@@ -820,7 +820,7 @@ export class StripeTrigger implements INodeType {
|
|||||||
try {
|
try {
|
||||||
await stripeApiRequest.call(this, 'GET', endpoint, {});
|
await stripeApiRequest.call(this, 'GET', endpoint, {});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.message.includes('resource_missing')) {
|
if (error.httpCode === '404' || error.message.includes('resource_missing')) {
|
||||||
// Webhook does not exist
|
// Webhook does not exist
|
||||||
delete webhookData.webhookId;
|
delete webhookData.webhookId;
|
||||||
delete webhookData.webhookEvents;
|
delete webhookData.webhookEvents;
|
||||||
|
|||||||
Reference in New Issue
Block a user