Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include error cause in exception raising #169

Closed
wants to merge 1 commit into from

Conversation

hithwen
Copy link

@hithwen hithwen commented Aug 20, 2018

This is specially useful for bad requests calls

This is specially useful for bad requests calls
@codecov-io
Copy link

Codecov Report

Merging #169 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #169   +/-   ##
=======================================
  Coverage   83.06%   83.06%           
=======================================
  Files          30       30           
  Lines        1943     1943           
=======================================
  Hits         1614     1614           
  Misses        329      329

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6d53ab2...509150b. Read the comment docs.

@@ -106,5 +106,5 @@ def perform_query(self, method, path, data = {}, headers = None):
try:
resp.raise_for_status()
except requests.exceptions.HTTPError as e:
raise e
raise requests.exceptions.HTTPError(resp.content, e)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this work? Does HTTPError handle the arguments or does IOError do it?

Also, could we just use e.response where ever this exception is caught again? Not sure what the purpose of throwing this exception again is anyways actually.

@andrewmchen
Copy link
Contributor

Looks like #192 implements similar behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants