diff --git a/src/cryptoadvance/specter/rpc.py b/src/cryptoadvance/specter/rpc.py index abfda573a..5272a6393 100644 --- a/src/cryptoadvance/specter/rpc.py +++ b/src/cryptoadvance/specter/rpc.py @@ -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,