Skip to content

Scheduling infrastructure for absolutely everyone.

fix: Convert an error in webhook to info (#20806)

Hariom Balharaf163e4638b4f
diff --git a/packages/features/ee/billing/api/webhook/_invoice.paid.org.ts b/packages/features/ee/billing/api/webhook/_invoice.paid.org.ts
index 9012d15fcd5..a79fa0b9014 100644
--- a/packages/features/ee/billing/api/webhook/_invoice.paid.org.ts
+++ b/packages/features/ee/billing/api/webhook/_invoice.paid.org.ts
@@ -49,14 +49,13 @@ const handler = async (data: SWHMap["invoice.paid"]["data"]) => {
);
if (!organizationOnboarding) {
- logger.error(
- `NonRecoverableError: No onboarding record found for stripe customer id: ${invoice.customer}.`
+ // Invoice Paid is received for all organizations, even those that were created before Organization Onboarding was introduced.
+ logger.info(
+ `No onboarding record found for stripe customer id: ${invoice.customer}, Organization created before Organization Onboarding was introduced, so ignoring the webhook`
);
- // Don't throw as we don't want to retry.
return {
- success: false,
- error: `No onboarding record found for stripe customer id: ${invoice.customer}.`,
+ success: true,
};
}