-
Notifications
You must be signed in to change notification settings - Fork 619
[Dashboard] Improve error handling in billing checkout process #7318
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
[Dashboard] Improve error handling in billing checkout process #7318
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
WalkthroughThe changes refactor the billing checkout flow in the dashboard app to use structured error handling. The Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CheckoutPage
participant BillingUtils
participant StripeRedirectErrorPage
User->>CheckoutPage: Access checkout page
CheckoutPage->>BillingUtils: getBillingCheckoutUrl({ teamSlug, sku })
BillingUtils-->>CheckoutPage: { status: "success", data: url } or { status: "error", error: message }
alt Success
CheckoutPage->>User: Redirect to billing checkout URL
else Error
CheckoutPage->>StripeRedirectErrorPage: Render with error message
StripeRedirectErrorPage->>User: Show error and "Go back" button
User->>StripeRedirectErrorPage: Click "Go back"
StripeRedirectErrorPage->>CheckoutPage: router.back()
end
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
⏰ Context from checks skipped due to timeout of 90000ms (4)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
e028770 to
604612d
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7318 +/- ##
=======================================
Coverage 55.57% 55.57%
=======================================
Files 909 909
Lines 58673 58673
Branches 4158 4158
=======================================
Hits 32607 32607
Misses 25959 25959
Partials 107 107
🚀 New features to boost your workflow:
|
size-limit report 📦
|
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.
✅ BugBot reviewed your changes and found no bugs!
BugBot free trial expires on June 14, 2025
You have used $0.00 of your $100.00 spend limit so far. Manage your spend limit in the Cursor dashboard.
Was this report helpful? Give feedback by reacting with 👍 or 👎
Merge activity
|
# Add "Go back" button to Stripe redirect error page and improve error handling This PR enhances the Stripe redirect error page by adding a "Go back" button, allowing users to navigate away from error states. It also improves error handling in the billing checkout flow by: 1. Converting `getBillingCheckoutUrl()` to return structured responses with proper error messages 2. Adding specific error messages for different HTTP status codes (402 for outstanding invoices, 429 for rate limiting) 3. Displaying these more descriptive error messages to users when checkout fails These changes provide a better user experience when errors occur during the checkout process. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a "Go back" button to the Stripe redirect error page, allowing users to easily return to the previous screen. - **Bug Fixes** - Improved error handling during the checkout process, providing clearer error messages for issues such as authentication, outstanding invoices, rate limiting, and unknown errors. Error messages are now displayed directly on the error page when checkout fails. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
604612d to
eb1c705
Compare

Add "Go back" button to Stripe redirect error page and improve error handling
This PR enhances the Stripe redirect error page by adding a "Go back" button, allowing users to navigate away from error states. It also improves error handling in the billing checkout flow by:
getBillingCheckoutUrl()to return structured responses with proper error messagesThese changes provide a better user experience when errors occur during the checkout process.
Summary by CodeRabbit
New Features
Bug Fixes
PR-Codex overview
This PR focuses on enhancing error handling in the checkout process for Stripe payments. It updates functions to return structured error responses and modifies the UI to display errors more effectively.
Detailed summary
getBillingCheckoutUrlto return structured error responses.StripeRedirectErrorPageto include a "Go back" button for user navigation.