Skip to content

Conversation

thewhaleking
Copy link
Collaborator

Eliminates a lot of double-checking for "error" in response, and adds error checking for this for get_chain_head

Resolves #182

Relies on the fact that all calls to SubstrateInterface/AsyncSubstrateInterface's rpc_request method checks two things:

  1. that the result dict does not contain "error"
  2. that the result dict does contain "result"

… error checking for this for `get_chain_head`
@thewhaleking thewhaleking requested a review from a team October 6, 2025 18:59
@thewhaleking thewhaleking changed the base branch from master to staging October 6, 2025 19:00
@basfroman basfroman added run-bittensor-sdk-tests Runs Bittensor SDK tests. run-bittensor-cli-tests Runs BTCLI tests. labels Oct 6, 2025
@thewhaleking thewhaleking merged commit 8d7de2c into staging Oct 6, 2025
31 checks passed
@thewhaleking thewhaleking deleted the fix/thewhaleking/clean-up-error-handling branch October 6, 2025 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-bittensor-cli-tests Runs BTCLI tests. run-bittensor-sdk-tests Runs Bittensor SDK tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

get_chain_head check if rpc_request is error before trying to parse.

2 participants