Skip to content

fix(billing): Guard against missing plan details in subscription header - #123683

Draft
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/billing-subscription-header-plan-details
Draft

fix(billing): Guard against missing plan details in subscription header#123683
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/billing-subscription-header-plan-details

Conversation

@sentry

@sentry sentry Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

This PR fixes a TypeError: undefined is not an object (evaluating 't.planDetails.name') that occurred in the /settings/billing/ page. The error happened when the SubscriptionHeader component attempted to access subscription.planDetails.name, but planDetails was undefined. This can occur for users whose accounts are disabled due to seat limits, as the API (/customers/{orgSlug}/) returns a minimal subscription object via DisabledMemberCustomerSerializer that omits planDetails.

The fix involves:

  • Conditionally rendering the plan name and icon block in SubscriptionHeader only when subscription.planDetails is present.
  • Guarding the getPlanIcon call with a check for subscription.planDetails to prevent crashes if it's missing.

The TypeScript Subscription type was intentionally left as planDetails: Plan (required) to avoid introducing widespread type errors across other components that correctly assume planDetails is always present for active subscriptions.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Fixes JAVASCRIPT-3BS1

@sentry <feedback>: Autofix iterates on these changes
@sentry stop iterating: Autofix stops iterating on this run

This PR was automatically generated by Sentry. You can adjust this setting at any time.

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants