Skip to content
This repository was archived by the owner on Aug 20, 2025. It is now read-only.

Commit 7d085a5

Browse files
authored
Return more details on connection errors. (#10)
1 parent a0139df commit 7d085a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ctapi/ctapi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,10 @@ def _api_query(self, method, params={}):
136136
'success': ret_json['success'],
137137
'result': ret_json
138138
}
139-
except:
139+
except Exception as e:
140140
return {
141141
'success': False,
142-
'message': "error connecting to API"
142+
'message': "error connecting to API: %s" % str(e)
143143
}
144144

145145
###########################################################################

0 commit comments

Comments
 (0)