We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6a73d66 + 65ce021 commit 11576a5Copy full SHA for 11576a5
src/bitcoin-cli.cpp
@@ -190,6 +190,15 @@ int CommandLineRPC(int argc, char *argv[])
190
throw CConnectionFailed("server in warmup");
191
strPrint = "error: " + error.write();
192
nRet = abs(code);
193
+ if (error.isObject())
194
+ {
195
+ UniValue errCode = find_value(error, "code");
196
+ UniValue errMsg = find_value(error, "message");
197
+ strPrint = errCode.isNull() ? "" : "error code: "+errCode.getValStr()+"\n";
198
+
199
+ if (errMsg.isStr())
200
+ strPrint += "error message:\n"+errMsg.get_str();
201
+ }
202
} else {
203
// Result
204
if (result.isNull())
0 commit comments