Enhance error handling for subscription lifecycle events in billing hooks

This commit is contained in:
Owen
2026-09-16 12:11:25 -04:00
parent 76a4f50ccf
commit 65ccd5a89d
3 changed files with 37 additions and 8 deletions
@@ -276,6 +276,13 @@ export async function handleSubscriptionCreated(
logger.debug(`Fossorial API response: ${JSON.stringify(data)}`);
if (!response.ok || !data.success) {
logger.error(
`Fossorial API returned ${response.status} when setting paid-for for orgId ${customer.orgId} and subscription ID ${subscription.id}: ${JSON.stringify(data)}`
);
return;
}
if (customer.email) {
logger.debug(
`Sending license key email to ${customer.email} for subscription ${subscription.id}`