refactor: standardize error handling in blockchain.py CLI commands
Some checks failed
CLI Tests / test-cli (push) Failing after 12s
Cross-Node Transaction Testing / transaction-test (push) Successful in 2s
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Node Failover Simulation / failover-test (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Some checks failed
CLI Tests / test-cli (push) Failing after 12s
Cross-Node Transaction Testing / transaction-test (push) Successful in 2s
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Node Failover Simulation / failover-test (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
- Replace bare except with specific exception types (KeyError, AttributeError) - Add re-raise statements to allow proper error handling upstream - Standardize error messages in multi-chain error handling - Improve error message consistency across all blockchain commands
This commit is contained in:
@@ -645,8 +645,9 @@ def peers(ctx, chain_id: str, all_chains: bool):
|
||||
all_peers[chain] = {
|
||||
"chain_id": chain,
|
||||
"peers": [],
|
||||
"error": str(e),
|
||||
"available": False
|
||||
"error": f"Request failed: {str(e)}",
|
||||
"available": False,
|
||||
"query_type": "all_chains_error"
|
||||
}
|
||||
|
||||
# Count chains with available peers
|
||||
|
||||
Reference in New Issue
Block a user