mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-04 14:54:26 +01:00
plugin: log response given by plugin if it's invalid JSON.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -276,7 +276,8 @@ static bool plugin_read_json_one(struct plugin *plugin)
|
||||
toks = json_parse_input(plugin->buffer, plugin->used, &valid);
|
||||
if (!toks) {
|
||||
if (!valid) {
|
||||
plugin_kill(plugin, "Failed to parse JSON response");
|
||||
plugin_kill(plugin, "Failed to parse JSON response '%.*s'",
|
||||
(int)plugin->used, plugin->buffer);
|
||||
return false;
|
||||
}
|
||||
/* We need more. */
|
||||
|
||||
Reference in New Issue
Block a user