Merge pull request #2521 from fjarri/fix-build

Fix CI build
pull/2523/head
K Prasch 2021-01-14 11:10:12 -08:00 committed by GitHub
commit 2980c7fb2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions

View File

@ -0,0 +1 @@
Restore the re-raising behavior in ``BlockchainInterface._handle_failed_transaction()``

View File

@ -403,17 +403,13 @@ class BlockchainInterface:
# TODO: #1504 - Additional Handling of validation failures (gas limits, invalid fields, etc.)
"""
try:
response = exception.args[0]
except (AttributeError, TypeError):
# Python exceptions must have the 'args' attribute which must be a sequence (i.e. indexable)
raise ValueError(f'{exception} is not a valid Exception instance')
response = exception.args[0]
# Assume this error is formatted as an RPC response
try:
code = int(response['code'])
message = response['message']
except (KeyError, ValueError):
except Exception:
# TODO: #1504 - Try even harder to determine if this is insufficient funds causing the issue,
# This may be best handled at the agent or actor layer for registry and token interactions.
# Worst case scenario - raise the exception held in context implicitly