Skip to content

Commit 972c8a1

Browse files
committed
Add detailed logging to mismatch errors
1 parent 5bc73fc commit 972c8a1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

api/src/webhook-handling.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ export async function updateProUserData(email: string, subscriptionUpdate: Parti
7878
appData.subscription_status !== 'past_due' &&
7979
moment(appData.subscription_expiry).subtract(5, 'days').valueOf() > Date.now()
8080
) {
81+
console.log('Existing data', JSON.stringify(appData));
82+
console.log('Mismatched updated', JSON.stringify(subscriptionUpdate));
83+
8184
reportError(`Mismatched subscription event for Pro user ${email} with existing subscription`);
8285
}
8386
}

0 commit comments

Comments
 (0)