Skip to content

Commit

Permalink
Improve error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
hwwhww committed Mar 13, 2023
1 parent aae55a6 commit f79bbac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions staking_deposit/utils/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ def validate_eth1_withdrawal_address(cts: click.Context, param: Any, address: st
if address is None:
return None
if not is_hex_address(address):
raise ValueError(load_text(['err_invalid_ECDSA_hex_addr']))
raise ValidationError(load_text(['err_invalid_ECDSA_hex_addr']))
if not is_checksum_address(address):
raise ValueError(load_text(['err_invalid_ECDSA_hex_addr_checksum']))
raise ValidationError(load_text(['err_invalid_ECDSA_hex_addr_checksum']))

normalized_address = to_normalized_address(address)
click.echo('\n%s\n' % load_text(['msg_ECDSA_hex_addr_withdrawal']))
Expand Down

0 comments on commit f79bbac

Please sign in to comment.