Better failed request logging in api_client v1
This commit is contained in:
parent
d44317a28a
commit
f5d1ffe27c
|
@ -121,8 +121,9 @@ class ApiRequest:
|
||||||
raise
|
raise
|
||||||
except requests.exceptions.HTTPError:
|
except requests.exceptions.HTTPError:
|
||||||
self.logger.error(
|
self.logger.error(
|
||||||
f"HTTP request to '{res.request.url}' failed"
|
f"{res.request.method} {res.request.url} request failed '{res.status_code}':"
|
||||||
f" with status '{res.status_code}':\n{res.text}"
|
f"\nPayload: {res.request.body}"
|
||||||
|
f"\nResponse: {res.text}"
|
||||||
)
|
)
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue