Closed
Description
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.
Metadata
Assignees
Labels
No labels