Skip to content
This repository has been archived by the owner on Oct 27, 2020. It is now read-only.

Commit

Permalink
Add server response on API error to stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
Marenthyu committed Nov 16, 2017
1 parent ba04993 commit 1ba59bf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ratlib/api/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ def call(method, uri, data=None, statuses=None, log=None, headers=None, **kwargs
data=json.dumps(data, sort_keys=True, indent=" " * 4)
)
)
if response is not None:
print("Response:")
print(response.text)
raise HTTPError(code=ex.response.status_code, details=str(ex)) from ex
except exc.RequestException as ex:
try:
Expand Down

0 comments on commit 1ba59bf

Please sign in to comment.