make the insight_api driver print something more useful on UTXO connection failure

This commit is contained in:
Jude Nelson
2017-05-03 14:45:48 -04:00
parent 9fd544afc9
commit e171f7c5ae

View File

@@ -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()