-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 message on mistyped command [RIPD-1527] #2283
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2283 +/- ##
===========================================
+ Coverage 70.22% 70.81% +0.58%
===========================================
Files 692 692
Lines 50961 51050 +89
===========================================
+ Hits 35787 36149 +362
+ Misses 15174 14901 -273
Continue to review full report at Codecov.
|
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.
Looks good to me. Good log message.
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.
👍
* Can be exercised from the command line with json2 * Rewrite Env::do_rpc to call the same code as rpc from the command line. This puts rpc handling logic in one place.
Previously if you mistyped the "submit_multisigned" command as "submit_multisign", the returned message was "Internal error". Not very helpful. It turns out this was caused by a small amount of code in RPCCall.cpp. Removing that code improves two situations: 1. It improves the situation with a mistyped command. Now the command returns "Unknown method" and provides the string of the mistyped command. 2. The "transaction_entry", if properly entered in its command line form, would fire an assert. That assert is now removed. In the process, it was discovered that the command line form of the "transaction_entry" command has not worked correctly for at least a year. Therefore support for that the command line form of "transaction_entry" is added along with appropriate unit tests.
613dc6e
to
0681702
Compare
Rebased to 0.80.1. |
In 0.90.0-b1 |
First things first; only the (currently) top-most commit needs to be reviewed. This pull request sits atop an earlier pull request from @HowardHinnant who is working in the same area.
Previously if you mistyped the "submit_multisigned" command as "submit_multisign", the returned message was "Internal error". Not very helpful. It turns out this was caused by a small amount of code in RPCCall.cpp. Removing that code improves two situations:
It improves the situation with a mistyped command. Now the command returns "Unknown method" and provides the string of the mistyped command.
The "transaction_entry" RPC command, if properly entered in its command line form, would fire an assert. That assert is now removed.
In the process, it was discovered that the command line form of the "transaction_entry" command has not worked correctly for at least a year. Therefore support for the command line form of "transaction_entry" is added along with appropriate unit tests.
Reviewers: @HowardHinnant for familiarity with RPC, @mellery451 for familiarity with TransactionEntry_test.cpp.