Skip to content

Commit 82077ef

Browse files
committed
Merge #9073: Trivial: Add common failure cases for rpc server connection failure
8f329f9 Add common failure cases for rpc server connection failure (instagibbs)
2 parents 3665483 + 8f329f9 commit 82077ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bitcoin-cli.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ UniValue CallRPC(const string& strMethod, const UniValue& params)
240240
event_base_free(base);
241241

242242
if (response.status == 0)
243-
throw CConnectionFailed(strprintf("couldn't connect to server (%d %s)", response.error, http_errorstring(response.error)));
243+
throw CConnectionFailed(strprintf("couldn't connect to server\n(make sure server is running and you are connecting to the correct RPC port: %d %s)", response.error, http_errorstring(response.error)));
244244
else if (response.status == HTTP_UNAUTHORIZED)
245245
throw runtime_error("incorrect rpcuser or rpcpassword (authorization failed)");
246246
else if (response.status >= 400 && response.status != HTTP_BAD_REQUEST && response.status != HTTP_NOT_FOUND && response.status != HTTP_INTERNAL_SERVER_ERROR)

0 commit comments

Comments
 (0)