From 89aedc2f2ab2f137193ca64fdc1edb2095d030c8 Mon Sep 17 00:00:00 2001 From: titanism <101466223+titanism@users.noreply.github.com> Date: Wed, 6 Nov 2024 23:55:49 -0600 Subject: [PATCH] fix: fixed stripe job with more debug output --- jobs/stripe/check-subscription-accuracy.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/jobs/stripe/check-subscription-accuracy.js b/jobs/stripe/check-subscription-accuracy.js index 3d299f80ab..9fda953135 100644 --- a/jobs/stripe/check-subscription-accuracy.js +++ b/jobs/stripe/check-subscription-accuracy.js @@ -72,10 +72,16 @@ async function mapper(customer) { }) ]); - if (activeSubscriptions.has_more || trialingSubscriptions.has_more) - throw new Error( - 'Subscriptions has_more bug - this should not have pagination' + if (activeSubscriptions.has_more || trialingSubscriptions.has_more) { + const err = new TypeError( + 'Subscriptions has_more issue - this should not have pagination' ); + err.isCodeBug = true; + err.customer = customer; + err.activeSubscriptions = activeSubscriptions; + err.trialingSubscriptions = trialingSubscriptions; + throw err; + } let subscriptions = [ ...activeSubscriptions.data,