MCPcopy Index your code
hub / github.com/blockfrost/blockfrost-python / ApiError

Class ApiError

blockfrost/utils.py:11–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9
10
11class ApiError(Exception):
12
13 def __init__(self, response: Response):
14 try:
15 # assume Response json
16 response_json = response.json()
17 super().__init__(response_json)
18 self.status_code = response_json['status_code']
19 self.error = response_json['error']
20 self.message = response_json['message']
21 except Exception:
22 super().__init__(response)
23 self.status_code = response.status_code
24 self.error = None
25 self.message = None
26
27
28class Namespace(SimpleNamespace):

Callers 3

error_wrapperFunction · 0.85
recursive_appendFunction · 0.85
paginationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected