-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
rpcserver: Fix Error message returned by processRequest #1695
Conversation
When processRequest can't find a rpc command, standardCmdResult returns a `btcjson.ErrRPCMethodNotFound` but it gets ignored and a `btcjson.ErrRPCInvalidRequest` is returned instead. This makes processRequest return the right error message.
Pull Request Test Coverage Report for Build 636199679
💛 - Coveralls |
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.
Good catch.
OK
@gchaincl looks good but any chance you could squash these to one commit (with just the one commit 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.
Change is good but if possible, squash would be nice to keep history clean.
Thanks!
Sure, will do |
65bff6c
to
d376b91
Compare
@jcvernaleo commits squashed |
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.
OK
When processRequest can't find a rpc command,
standardCmdResult
returns abtcjson.ErrRPCMethodNotFound
but it gets ignored and abtcjson.ErrRPCInvalidRequest
is returned instead.For example when I run the
createwallet
commandThis is the error message I get:
But instead I should get this (returned by
standardCmdResult
)This fixes
processRequest
behavior to return the right error message.