libplugin: mention error field in error message.

Reported-by: @cdecker
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2019-01-17 07:05:50 +10:30 committed by Christian Decker
parent c83823a525
commit 02436a8e6d

View file

@ -300,7 +300,7 @@ static const jsmntok_t *read_rpc_reply(const tal_t *ctx,
*contents = json_get_member(membuf_elems(&rpc->mb), toks,
"result");
if (!*contents)
plugin_err("JSON reply with no 'result'? '%.*s'",
plugin_err("JSON reply with no 'result' nor 'error'? '%.*s'",
*reqlen, membuf_elems(&rpc->mb));
*error = false;
}