Skip to content

Commit

Permalink
fix: use response.text to get string rather than bytes (#3156)
Browse files Browse the repository at this point in the history
Signed-off-by: Mehmet Nuri Deveci <[email protected]>
Co-authored-by: Milas Bowman <[email protected]>
  • Loading branch information
mndeveci and milas authored Aug 14, 2023
1 parent 806d36a commit 0618951
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docker/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def create_api_error_from_http_exception(e):
try:
explanation = response.json()['message']
except ValueError:
explanation = (response.content or '').strip()
explanation = (response.text or '').strip()
cls = APIError
if response.status_code == 404:
explanation_msg = (explanation or '').lower()
Expand Down

0 comments on commit 0618951

Please sign in to comment.