Skip to content

Commit 8e8a113

Browse files
committed
Added additional logging of result text if returned an errored status code
1 parent 150acc4 commit 8e8a113

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

stackdio/client/http.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,11 @@ def _request(self, verb, url, quiet=False,
130130
return None
131131

132132
elif raise_for_status:
133-
result.raise_for_status()
133+
try:
134+
result.raise_for_status()
135+
except Exception:
136+
logger.error(result.text)
137+
raise
134138

135139
# return
136140
if jsonify:

0 commit comments

Comments
 (0)