Skip to content

Commit

Permalink
fix: fixed stripe job with more debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Nov 7, 2024
1 parent fbdab84 commit 89aedc2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions jobs/stripe/check-subscription-accuracy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 89aedc2

Please sign in to comment.