-
Notifications
You must be signed in to change notification settings - Fork 131
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 formatting for bitcoin'd rpc error messages #133
Conversation
Using the `From<errors::Error> for HttpError` conversion, which uses the full Error `Display` instead of just its `description()`. Resolves romanz#132.
Example with new formatting: sendrawtransaction RPC error -22: TX decode failed. Make sure the tx has at least one input. Instead of: sendrawtransaction RPC error -22: {"code":-22,"message":"TX decode failed. Make sure the tx has at least one input."}
1250b19
to
a66615f
Compare
LGTM, is it feasible to add a test asserting on error string in |
I see the expected behaviour now, but please add a test for this in client:
electrs:
|
Yes, added in ee58814, including a test for a successful |
They were broken by the test added in the last commit, which mined an extra block and caused the `GET /block/:hash` tests for Elements to run against a Compact params blocks instead of a Full one. This commit fixes it by running the tests against blocks 1 & 2 which are known to be Full & Compact respectively.
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.
ack 4878e0a
Resolves #132.