-
Notifications
You must be signed in to change notification settings - Fork 429
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
fix: subscription state #4710
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Docker builds report
|
Uffizzi Preview |
There was a problem hiding this 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.
try { | ||
if (res && res.subscription && res.subscription.plan) { | ||
API.trackEvent(Constants.events.UPGRADE(res.subscription.plan)) | ||
API.postEvent(res.subscription.plan, 'chargebee') | ||
} | ||
} catch (e) {} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Thanks for submitting a PR! Please check the boxes below:
docs/
if required so people know about the feature!Changes
Closes #3952
Fixes state when subscription by refreshing the organisations.
How did you test this code?
Subscribed on staging.