-
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
Improved error display #4209
Improved error display #4209
Conversation
…layed on the front end properly.
PRO-950 RPC result with a DispatchError::Other is empty
When a You can see this bug if you try and call a
I believe this bug is caused by the static str inside the |
Codecov Report
@@ Coverage Diff @@
## main #4209 +/- ##
=====================================
- Coverage 71% 71% -0%
=====================================
Files 383 383
Lines 62704 62744 +40
Branches 62704 62744 +40
=====================================
+ Hits 44822 44845 +23
- Misses 15550 15561 +11
- Partials 2332 2338 +6
... and 6 files with indirect coverage changes 📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
Improved dry run's debug logging for more clarity
MissingPolkadotVault, | ||
/// Bitcoin's Vault key does not exist for the current epoch. | ||
MissingBitcoinVault, | ||
/// Intent ID is too large for Bitcoin address derivation |
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.
/// Intent ID is too large for Bitcoin address derivation | |
/// Channel ID is too large for Bitcoin address derivation. |
/// Bitcoin's Vault key does not exist for the current epoch. | ||
MissingBitcoinVault, | ||
/// Intent ID is too large for Bitcoin address derivation | ||
BitcoinIntentIdTooLarge, |
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.
BitcoinIntentIdTooLarge, | |
BitcoinChannelIdTooLarge, |
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.
FWIW I think we should probably wrap the channel id counter instead of returning an error. Can wait for another PR.
state-chain/pallets/cf-lp/src/lib.rs
Outdated
UnauthorisedToModify, | ||
// The Asset cannot be egressed to the destination chain. | ||
/// The Asset cannot be egressed to the destination chain. |
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 message doesn't say anything about the address.
* Changed a DispatchError::Other() to a pallet error, so it can be displayed on the front end properly. * Replaced DispatchError::Other with module error for better display Improved dry run's debug logging for more clarity * minor rename
Pull Request
Closes: PRO-950
Checklist
Please conduct a thorough self-review before opening the PR.
Summary
Changed invalid BTC address error for lp_withdraw_asset from DispatchError::Other() to a pallet error, so it can be displayed on the front end properly.