Parse RPC errors as JSON content
authorJeffrey Czyz <jkczyz@gmail.com>
Wed, 26 May 2021 17:57:39 +0000 (10:57 -0700)
committerJeffrey Czyz <jkczyz@gmail.com>
Wed, 26 May 2021 17:57:39 +0000 (10:57 -0700)
commitb2f16ad821672e07fd588beecd117206d9b656fd
treee78a71b310792d5acbcc1156b7c137220257de34
parent61648fc804dbb22147a239223c2483967c4c8e62
Parse RPC errors as JSON content

Bitcoin Core's JSON RPC server returns errors as HTTP error responses
with JSON content in the body. Parse this content as JSON to give a more
meaningful error. Otherwise, "binary" is given because the content
contains ASCII control characters.
lightning-block-sync/src/rpc.rs