mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
plugins/renepay: don't require raw_message in error reply.
It's not there if it's a local error:
```
{
"code": 202,
"message": "Parsing '{message:%,data:{erring_index:%,failcode:%,raw_message:': object does not have member raw_message"
}
```
Reported-by: https://github.com/daywalker90
Fixes: #6553
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -1285,11 +1285,12 @@ static struct pf_result *sendpay_failure(struct pay_flow *pf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Extract remaining fields for feedback */
|
/* Extract remaining fields for feedback */
|
||||||
|
raw = NULL;
|
||||||
err = json_scan(tmpctx, buf, sub,
|
err = json_scan(tmpctx, buf, sub,
|
||||||
"{message:%"
|
"{message:%"
|
||||||
",data:{erring_index:%"
|
",data:{erring_index:%"
|
||||||
",failcode:%"
|
",failcode:%"
|
||||||
",raw_message:%}}",
|
",raw_message?:%}}",
|
||||||
JSON_SCAN_TAL(tmpctx, json_strdup, &msg),
|
JSON_SCAN_TAL(tmpctx, json_strdup, &msg),
|
||||||
JSON_SCAN(json_to_u32, &erridx),
|
JSON_SCAN(json_to_u32, &erridx),
|
||||||
JSON_SCAN(json_to_u32, &onionerr),
|
JSON_SCAN(json_to_u32, &onionerr),
|
||||||
|
|||||||
Reference in New Issue
Block a user