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

ClientResponseError does not include URL #3959

Closed
dkliban opened this issue Aug 4, 2019 · 1 comment
Closed

ClientResponseError does not include URL #3959

dkliban opened this issue Aug 4, 2019 · 1 comment

Comments

@dkliban
Copy link
Contributor

dkliban commented Aug 4, 2019

Long story short

The string representation of ClientResponseErrors only includes the response code and message. It would be more useful for users seeing these errors in logs to know which URL produced the response.

Expected behaviour

File "/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/plugin/download/http.py", line 183, in _run
response.raise_for_status()
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/aiohttp/client_reqrep.py", line 944, in raise_for_status
headers=self.headers)
aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url='https://badexample.com'

Actual behaviour

File "/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/plugin/download/http.py", line 183, in _run
response.raise_for_status()
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/aiohttp/client_reqrep.py", line 944, in raise_for_status
headers=self.headers)
aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found'

Steps to reproduce

Make an GET request that you know will produce a 404. Don't handle the exception and then look at the stacktrace printed.

@asvetlov
Copy link
Member

Fixed by #3960

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

No branches or pull requests

2 participants