Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion static/gsApp/views/amCheckout/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,23 @@
return buckets[slot]!;
}
}
throw new Error('Invalid data category for plan');

// Report to Sentry but don't crash the page
Sentry.withScope(scope => {
scope.setExtras({
buckets,
events,
price,
shouldMinimize,
});
Sentry.captureException(new Error('Invalid data category for plan'));
});

// Return a fallback bucket with zero price to prevent crashes
return {
price: 0,
quantity: events ?? 0,

Check failure on line 203 in static/gsApp/views/amCheckout/utils.tsx

View workflow job for this annotation

GitHub Actions / @typescript/native-preview

Object literal may only specify known properties, and 'quantity' does not exist in type 'EventBucket'.

Check failure on line 203 in static/gsApp/views/amCheckout/utils.tsx

View workflow job for this annotation

GitHub Actions / typescript

Object literal may only specify known properties, and 'quantity' does not exist in type 'EventBucket'.
};
}

type ReservedTotalProps = {
Expand Down
Loading