Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: subscription state #4710

Merged
merged 1 commit into from
Oct 15, 2024
Merged

fix: subscription state #4710

merged 1 commit into from
Oct 15, 2024

Conversation

kyle-ssg
Copy link
Member

@kyle-ssg kyle-ssg commented Oct 9, 2024

Thanks for submitting a PR! Please check the boxes below:

  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

Closes #3952

Fixes state when subscription by refreshing the organisations.

How did you test this code?

Subscribed on staging.

@kyle-ssg kyle-ssg requested a review from a team as a code owner October 9, 2024 14:09
Copy link

vercel bot commented Oct 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 9, 2024 2:11pm
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 9, 2024 2:11pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Oct 9, 2024 2:11pm

@kyle-ssg kyle-ssg requested a review from matthewelwell October 9, 2024 14:09
@github-actions github-actions bot added the front-end Issue related to the React Front End Dashboard label Oct 9, 2024
Copy link
Contributor

github-actions bot commented Oct 9, 2024

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-e2e:pr-4710 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api-test:pr-4710 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-4710 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-4710 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-4710 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-4710 Finished ✅ Results

Copy link
Contributor

github-actions bot commented Oct 9, 2024

Uffizzi Preview deployment-57081 was deleted.

@kyle-ssg kyle-ssg changed the title Fix subscription state fix: subscription state Oct 9, 2024
Copy link
Contributor

@zachaysan zachaysan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Provisionally approved with one improvement suggested.

Comment on lines +370 to +375
try {
if (res && res.subscription && res.subscription.plan) {
API.trackEvent(Constants.events.UPGRADE(res.subscription.plan))
API.postEvent(res.subscription.plan, 'chargebee')
}
} catch (e) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really love the empty catch here. Can we silently swallow error conditions that we've allowlisted ahead of time?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just in case Analytics tools are broke for whatever reason, in which case we'd still see something in sentry. Just needs to ensure the later more important things happen regardless.

@kyle-ssg kyle-ssg added this pull request to the merge queue Oct 15, 2024
Merged via the queue into main with commit 796fb01 Oct 15, 2024
31 checks passed
@kyle-ssg kyle-ssg deleted the fix/create_subscription_state branch October 15, 2024 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
front-end Issue related to the React Front End Dashboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Navigation issues post plan change in organisation settings
2 participants