Skip to content

Commit

Permalink
Issue #491: add response headers to response parse warning
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Oct 31, 2023
1 parent 15b202c commit 6b8a264
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openeo/rest/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def _raise_api_error(self, response: requests.Response):
except Exception:
# Parsing of error info went wrong: let's see if we can still extract some helpful information.
text = response.text
_log.warning("Failed to parse API error response: {s} {t!r}".format(s=status_code, t=text))
_log.warning(f"Failed to parse API error response: [{status_code}] {text!r} (headers: {response.headers})")
if status_code == 502 and "Proxy Error" in text:
msg = "Received 502 Proxy Error." \
" This typically happens if an OpenEO request takes too long and is killed." \
Expand Down

0 comments on commit 6b8a264

Please sign in to comment.