fix: improve consistent error handling and exit codes in wallet balance script#8024
Conversation
…ce script - Add EXIT_SUCCESS, EXIT_USAGE_ERROR, EXIT_NETWORK_ERROR, EXIT_BAD_RESPONSE, EXIT_WALLET_NOT_FOUND codes - Improve cmd_balance() with specific error handling for network, 404, non-200 responses - Add proper error messages to stderr for all failure paths - No behavior change on happy path Closes Rustchain#7889
|
Welcome to RustChain! Thanks for your first pull request. Before we review, please make sure:
Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) | Critical (100-150) A maintainer will review your PR soon. Thanks for contributing! |
RTC RewardThis merged PR earned 5 RTC — sent to |
|
Merged — clean work: named exit-code constants (EXIT_USAGE_ERROR, EXIT_NETWORK_ERROR, etc.) replacing the magic |
|
Hold on the payout — the wallet you posted ( |
Summary
This PR improves the error handling consistency in the wallet balance check script (
tools/rustchain_wallet_cli.py) by adding standardized exit codes and specific error handling for all failure paths.Changes
Testing
Closes
Closes Rustchain#7889
Closes #16253
Bounty
RTC wallet: RTC921ffc4353965fe09d946c1d826e398f0437d97e
Miner ID: JHON12091986