Skip to content

Commit

Permalink
do not assume error property in catch all rpc methods magic function
Browse files Browse the repository at this point in the history
  • Loading branch information
moneymanolis committed Dec 18, 2024
1 parent 0ac4640 commit aba08e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cryptoadvance/specter/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ def trace_call_after(cls, url, payload, timestamp):
def __getattr__(self, method):
def fn(*args, **kwargs):
r = self.multi([(method, *args)], **kwargs)[0]
if r["error"] is not None:
if r.get("error") is not None:
raise RpcError(
f"Request error for method {method}{args}: {r['error']['message']}",
r,
Expand Down

0 comments on commit aba08e7

Please sign in to comment.