Use reason_phrase

https://www.python-httpx.org/api/
This commit is contained in:
Ben Campbell 2021-11-23 17:42:40 +00:00 committed by Roxedus
parent b3a8c864b9
commit ff944ade69
No known key found for this signature in database
GPG Key ID: EBC13557C4D91D7B

View File

@ -125,7 +125,7 @@ class NiceHashPublicClient:
if response.status_code == 200:
return response.json()
else:
err_messages = [str(response.status_code), response.reason]
err_messages = [str(response.status_code), response.reason_phrase]
if response.content:
err_messages.append(str(response.content))
raise Exception(": ".join(err_messages))
@ -190,7 +190,7 @@ class NiceHashPrivateClient:
if response.status_code == 200:
return response.json()
else:
err_messages = [str(response.status_code), response.reason]
err_messages = [str(response.status_code), response.reason_phrase]
if response.content:
err_messages.append(str(response.content))
raise Exception(": ".join(err_messages))