mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-23 03:20:19 +08:00
make the insight_api driver print something more useful on UTXO connection failure
This commit is contained in:
@@ -38,8 +38,9 @@ class InsightClient(object):
|
||||
try:
|
||||
req = requests.get(url)
|
||||
resp = req.json()
|
||||
except:
|
||||
raise Exception("Failed to query UTXOs")
|
||||
except Exception as e:
|
||||
log.error("Failed to query UTXos")
|
||||
raise
|
||||
|
||||
# format...
|
||||
try:
|
||||
@@ -61,8 +62,9 @@ class InsightClient(object):
|
||||
|
||||
try:
|
||||
req = requests.post(url, data=data, headers=headers)
|
||||
except:
|
||||
raise Exception("Failed to send transaction")
|
||||
except Exception as e:
|
||||
log.error("Failed to send transaction")
|
||||
raise
|
||||
|
||||
try:
|
||||
resp = req.json()
|
||||
|
||||
Reference in New Issue
Block a user