mirror of
https://github.com/romanz/electrs.git
synced 2024-11-19 01:43:29 +01:00
Propagate Electrum JSON RPC error
This commit is contained in:
parent
fe1bfe3bc1
commit
fb88bccb0a
@ -17,7 +17,10 @@ class Client:
|
||||
msg = json.dumps(requests) + '\n'
|
||||
self.s.sendall(msg.encode('ascii'))
|
||||
response = json.loads(self.f.readline())
|
||||
return [r['result'] for r in response]
|
||||
try:
|
||||
return [r['result'] for r in response]
|
||||
except KeyError:
|
||||
raise ValueError(response)
|
||||
|
||||
|
||||
def request(method, *args):
|
||||
|
Loading…
Reference in New Issue
Block a user