Skip to content

Commit

Permalink
Return more details on connection errors. (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
valankar authored Sep 24, 2022
1 parent a0139df commit 7d085a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ctapi/ctapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ def _api_query(self, method, params={}):
'success': ret_json['success'],
'result': ret_json
}
except:
except Exception as e:
return {
'success': False,
'message': "error connecting to API"
'message': "error connecting to API: %s" % str(e)
}

###########################################################################
Expand Down

0 comments on commit 7d085a5

Please sign in to comment.