-
Notifications
You must be signed in to change notification settings - Fork 15
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: expose error detail when swap simulation fails #5485
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5485 +/- ##
======================================
- Coverage 72% 72% -0%
======================================
Files 495 495
Lines 88168 88049 -119
Branches 88168 88049 -119
======================================
- Hits 63152 62975 -177
- Misses 22449 22508 +59
+ Partials 2567 2566 -1 ☔ View full report in Codecov by Sentry. |
Is there still value in keepping the dispatcherror::Others variant? I believe that the original intent was for a string message to be passed through RPC back to the user. Maybe we should just replace the Other with your new type. |
Also a nitpick - the word "adhoc" isn't very clear on its intended purpose, or the difference between this and the other 2 variant. Maybe something like "message" or "string" or "utf8" would be clearer? |
I suppose the variant is just there to blanket cover all the other cases (non-module, non-str) |
491f41b
to
f6a87e4
Compare
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.
Nice. I'm already using this in the Vault swap branch!
This fixes an issue observed during the recent upgrade, when liquidity is low. Error messages were being erased due to the implementation of DispatchError.