Skip to content

Better surface errors when Gitpod fails to get your Stripe subscription details #14034

Closed
@jankeromnes

Description

@jankeromnes

Bug description

When Gitpod fails to find your Stripe Subscription ID (for example, if your team has 2 Stripe Customers due to another bug), our UI is quite confusing:

  • Your team's billing UI shows as if you were not subscribed at all (thus encouraging you to try and upgrade again 🙈)
  • Your personal billing UI's "Default Billing Account" selector remains pending forever

In both cases, this error is shown in the browser console:

Uncaught (in promise) Error: Failed to get Stripe Subscription ID for 'team:6d59097c-cbb7-4dc0-b7d5-9aa27452ccc0'

Also, in the server logs, the actual error appears, e.g.:

ClientError: /usage.v1.BillingService/GetStripeCustomer FAILED_PRECONDITION: found multiple customers for attributiuon_id: team:6d59097c-cbb7-4dc0-b7d5-9aa27452ccc0

Steps to reproduce

  1. Upgrade your team to usage-based
  2. Create a second Stripe Customer that has the same metadata (attributionId: "team:1234")
  3. Visit your team's billing UI (looks like you're not subscribed)
  4. Visit your user's billing UI (default billing account selector is pending forever)

Workspace affected

No response

Expected behavior

In both pages, Gitpod should at least show some sort of error message, thus giving the user a hint that something is wrong.

Something like this, for example:

Error while getting your subscription details: Gitpod encountered an error while getting your team's subscription details. Please contact support

Example repository

No response

Anything else?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions