From 4fa043126220dfc700ea4759c9ddb7e695926c33 Mon Sep 17 00:00:00 2001 From: Jimmy Domagala-Tang Date: Wed, 28 May 2025 13:34:58 -0400 Subject: [PATCH] prevent attempting to set headers after we already sent respone (#25994) GitOrigin-RevId: be9f63f4c6d86ccd7f55850d71f5f2564eab2f12 --- .../app/src/Features/Subscription/SubscriptionController.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/web/app/src/Features/Subscription/SubscriptionController.js b/services/web/app/src/Features/Subscription/SubscriptionController.js index 1cc2ad0094..7aa345e7a8 100644 --- a/services/web/app/src/Features/Subscription/SubscriptionController.js +++ b/services/web/app/src/Features/Subscription/SubscriptionController.js @@ -590,7 +590,7 @@ function recurlyCallback(req, res, next) { } // if theres no restore point it could be a failed renewal, or no restore set. Either way it will be handled through dunning automatically if (!lastSubscription || !lastSubscription?.planCode) { - res.sendStatus(200) + return res.sendStatus(200) } SubscriptionHandler.revertPlanChange( eventData.transaction.subscription_id, @@ -599,7 +599,7 @@ function recurlyCallback(req, res, next) { if (err) { return next(err) } - res.sendStatus(200) + return res.sendStatus(200) } ) }