Skip to content

Commit

Permalink
fix: use response.text to get string rather than bytes
Browse files Browse the repository at this point in the history
Signed-off-by: Mehmet Nuri Deveci <[email protected]>
  • Loading branch information
mndeveci committed Jul 7, 2023
1 parent 84414e3 commit a6c3d24
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 a6c3d24

Please sign in to comment.