MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / JSONRPCException

Class JSONRPCException

test/functional/test_framework/util.py:32–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30logger = logging.getLogger("TestFramework.utils")
31
32class JSONRPCException(Exception):
33 def __init__(self, rpc_error, http_status=None):
34 self.error = rpc_error
35 self.http_status = http_status
36
37 # throw KeyError if any required fields are missing
38 copied_error = copy(rpc_error)
39 message = copied_error.pop("message")
40 code = copied_error.pop("code")
41 extra = f'{copied_error}' if copied_error else ''
42 super().__init__(f"{message} ({code}) {extra} [http_status={http_status}]")
43
44# Assert functions
45##################

Callers 4

__call__Method · 0.85
batchMethod · 0.85
_get_responseMethod · 0.85
send_cliMethod · 0.85

Calls

no outgoing calls

Tested by 1

send_cliMethod · 0.68