Skip to content

Commit

Permalink
Error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
thewhaleking committed Aug 21, 2024
1 parent 7221d49 commit d27f5d2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/bittensor/async_substrate_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,9 +657,12 @@ async def _make_rpc_request(
):
# handles subscriptions, overwrites the previous mapping of {item_id : payload_id}
# with {subscription_id : payload_id}
item_id = request_manager.overwrite_request(
item_id, response["result"]
)
try:
item_id = request_manager.overwrite_request(
item_id, response["result"]
)
except KeyError:
raise SubstrateRequestException(str(response))
decoded_response, complete = await self._process_response(
response,
item_id,
Expand Down

0 comments on commit d27f5d2

Please sign in to comment.