-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Trivial: Add common failure cases for rpc server connection failure #9073
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
Conversation
src/bitcoin-cli.cpp
Outdated
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.
nit: please remove space before :.
b765a71 to
e7cd2de
Compare
|
Concept ACK, but I think this message is becoming too long to be crammed into one line. I think it'd make sense to write it out over multiple lines, e.g. leave the last line for the detailed error message (if any). |
e7cd2de to
8f329f9
Compare
|
added newline to break it up some of the text |
|
utACK 8f329f9 |
|
Tested ACK 8f329f9 |
…ion failure 8f329f9 Add common failure cases for rpc server connection failure (instagibbs)
|
This is a bit confusing now: If you don't know better it seems like the port is unknown. I think this would be better: |
Sorry for the churn on this, but the current message (introduced in bitcoin#9073) isn't acceptable: $ src/bitcoin-cli getinfo rpc: couldn't connect to server (make sure server is running and you are connecting to the correct RPC port: -1 unknown) Putting the error code after the words "RPC port" made me wonder whether there was a port configuration issue. This changes it to: $ src/bitcoin-cli getinfo error: couldn't connect to server: unknown (code -1) (make sure server is running and you are connecting to the correct RPC port)
libevent-based http server Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#5677 - bitcoin/bitcoin#6695 - bitcoin/bitcoin#6899 - bitcoin/bitcoin#7016 - bitcoin/bitcoin#7964 - bitcoin/bitcoin#8722 - bitcoin/bitcoin#8730 - bitcoin/bitcoin#9073 - bitcoin/bitcoin#9265 - bitcoin/bitcoin#9387 - bitcoin/bitcoin#9471 - bitcoin/bitcoin#9647 - bitcoin/bitcoin#9903 Closes #1593 and #1856.
libevent-based http server Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#5677 - bitcoin/bitcoin#6695 - bitcoin/bitcoin#6899 - bitcoin/bitcoin#7016 - bitcoin/bitcoin#7964 - bitcoin/bitcoin#8722 - bitcoin/bitcoin#8730 - bitcoin/bitcoin#9073 - bitcoin/bitcoin#9265 - bitcoin/bitcoin#9387 - bitcoin/bitcoin#9471 - bitcoin/bitcoin#9647 - bitcoin/bitcoin#9903 - bitcoin/bitcoin#6640 - bitcoin/bitcoin#8139 - bitcoin/bitcoin#8839 Closes #1593 and #1856.
…connection failure 8f329f9 Add common failure cases for rpc server connection failure (instagibbs)
Sorry for the churn on this, but the current message (introduced in bitcoin#9073) isn't acceptable: $ src/bitcoin-cli getinfo rpc: couldn't connect to server (make sure server is running and you are connecting to the correct RPC port: -1 unknown) Putting the error code after the words "RPC port" made me wonder whether there was a port configuration issue. This changes it to: $ src/bitcoin-cli getinfo error: couldn't connect to server: unknown (code -1) (make sure server is running and you are connecting to the correct RPC port)
…connection failure 8f329f9 Add common failure cases for rpc server connection failure (instagibbs)
…connection failure 8f329f9 Add common failure cases for rpc server connection failure (instagibbs)
As of now if you're not familiar with the other error responses, you might not know why connection failed. Give common reasons for this particular error message.