-
Notifications
You must be signed in to change notification settings - Fork 16
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
Better LP/Broker API RPC Errors #3931
Conversation
PRO-808 Better API errors.
We currently use the default error conversion from anyhow::Error. By default, this uses the "{}" formatter, which only uses the outermost error or context. This means that we often drop useful error messages and only display the context. For example, lp_registerAccount just shows We should include the runtime error message. |
Codecov Report
@@ Coverage Diff @@
## main #3931 +/- ##
=====================================
- Coverage 72% 72% -0%
=====================================
Files 366 366
Lines 56783 56789 +6
Branches 56783 56789 +6
=====================================
- Hits 40949 40945 -4
- Misses 13747 13756 +9
- Partials 2087 2088 +1
... and 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Thanks @j4m1ef0rd , LGTM.
Co-authored-by: Jamie Ford <Jamie@chainflip.io>
Co-authored-by: Jamie Ford <Jamie@chainflip.io>
…on-integration * origin/main: fix: scale encoding skip phantom data (#3967) chore: make platform team code owner of CI settings.toml and localnet (#3957) fix: prefer finalize_signed_extrinsic in engine (#3956) fix: CanonicalAssetPair encoding issue (#3958) chore(bouncer): Update sdk to 0.0.40 (#3945) fix: tweak cli generate-keys output (#3943) chore: add `preinst` script unit tests 🧪 (#3942) Better LP/Broker API RPC Errors (#3931) fix: update substrate ref to use Kademlia fix (#3941) doc: update funding readme with redemption restrictions (#3914) feat: PRO-474 broadcast safe mode (#3902) feat: more forgiving dot address parsing (#3938) fix: duplicate logging (#3939) feat: new lp interface (#3886) # Conflicts: # Cargo.lock # state-chain/cf-integration-tests/Cargo.toml # state-chain/cf-integration-tests/src/authorities.rs
Pull Request
Closes: PRO-808
Checklist
Please conduct a thorough self-review before opening the PR.
Summary
anyhow::Error
to allow conversion tojsonrpsee::types::ErrorObjectOwned
including context and source.