Skip to content

Commit

Permalink
Pass the error body when a unexpected HTTP error happens
Browse files Browse the repository at this point in the history
  • Loading branch information
erwan committed Nov 12, 2014
1 parent d6cebc1 commit 281c731
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prismic/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def _get_json(url, params=None, access_token=None, cache=None, ttl=None):
raise InvalidTokenError()
else:
print(full_url)
raise HTTPError(http_error.code, str(http_error))
raise HTTPError(http_error.code, str(http_error.readlines()))
except urlerror.URLError as url_error:
raise UnexpectedError("Unexpected error: %s" % url_error.reason)

Expand Down

0 comments on commit 281c731

Please sign in to comment.