-
Notifications
You must be signed in to change notification settings - Fork 618
[MNY-275] Surface the error from bridge API in SwapWidget UI #8277
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
💡 Enable Vercel Agent with $100 free credit for automated AI reviews |
|
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. |
WalkthroughError rendering in the Swap widget now displays the API error message when available (using Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Comment |
size-limit report 📦
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8277 +/- ##
=======================================
Coverage 54.89% 54.90%
=======================================
Files 919 919
Lines 60622 60622
Branches 4126 4116 -10
=======================================
+ Hits 33278 33282 +4
+ Misses 27242 27239 -3
+ Partials 102 101 -1
🚀 New features to boost your workflow:
|
Merge activity
|
<!--
## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"
If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):
## Notes for the reviewer
Anything important to call out? Be sure to also clarify these in your comments.
## How to test
Unit tests, playground, etc.
-->
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on improving error handling in the `swap-ui.tsx` component by providing more detailed error messages when fetching data fails.
### Detailed summary
- Added `multiline` property to a component.
- Updated error message for `preparedResultQuery.error` to display the specific error message if available, falling back to "Failed to get a quote".
- Retained existing error messages for `buyTokenQuery` and `sellTokenQuery`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved error display in the swap widget: error text now shows a more specific message when available, falls back to a generic failure message otherwise, and supports multiline wrapping so longer errors are fully visible to users.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
dad67b8 to
ca16ec7
Compare

PR-Codex overview
This PR enhances error handling in the
swap-ui.tsxcomponent by providing a more informative error message when fetching quote details fails.Detailed summary
multilineprop to the component.preparedResultQuery.errorto displaypreparedResultQuery.error.messageif available, defaulting to "Failed to get a quote".buyTokenQueryandsellTokenQuery.Summary by CodeRabbit