-
Notifications
You must be signed in to change notification settings - Fork 4.6k
CLI: Error message cleanup #8804
CLI: Error message cleanup #8804
Conversation
#[error("transport transaction error: {0}")] | ||
TransactionError(#[from] TransactionError), | ||
#[error("transport custom error: {0}")] | ||
Custom(String), |
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.
Might kill the String
here in favor of https://crates.io/crates/anyhow if time permits. Would allow removal of its companion variant in ClientError
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.
Tough call. anyhow
is another escape hatch. The team tends to make use of those too often.
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.
Yeah I was waffling on that notion. Probably better to yank the dependency-based variants out of ClientError
in favor of our own variants and some From
impls
They are intended to be displayed to users
c7e8dde
to
2c21011
Compare
Codecov Report
@@ Coverage Diff @@
## master #8804 +/- ##
========================================
+ Coverage 80% 80.1% +0.1%
========================================
Files 265 266 +1
Lines 57496 57401 -95
========================================
+ Hits 46014 46019 +5
+ Misses 11482 11382 -100 |
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.
I'm too late for most of the good nits, so just a couple consistency nits in the main()
s
Thanks for all this; big improvement!
Pull request has been modified.
@CriesofCarrots @garious @jackcmay I believe I've addressed all of the previous comments now |
please. Want this in 1.0.6. |
🤖 take the wheel! |
💔 Unable to automerge due to CI failure |
🤦 |
Problem
CLI produces error message that expose implementation details and are generally unfriendly to the user
Summary of Changes
io::Error
TODO
io::Error
abusers inRpcClient
Extend return type consistency to CLIBox<dyn error::Error>
will do for nowFixes #7722