mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Problem: No error handling for invalid election ids
Solution: Send an error message to `logger.error` if bigchain fails to get the election, then `return`
This commit is contained in:
parent
4a08abf4e8
commit
800a2dc791
@ -203,6 +203,9 @@ def run_upsert_validator_show(args, bigchain):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
election = bigchain.get_transaction(args.election_id)
|
election = bigchain.get_transaction(args.election_id)
|
||||||
|
if not election:
|
||||||
|
logger.error(f'No election found with election_id {args.election_id}')
|
||||||
|
return
|
||||||
|
|
||||||
new_validator = election.asset['data']
|
new_validator = election.asset['data']
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user