mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 22:24:23 +01:00
Adds a more verbose return for server errors
This commit is contained in:
@@ -269,7 +269,9 @@ def process_post_appointment_response(response):
|
|||||||
response_json = response.json()
|
response_json = response.json()
|
||||||
|
|
||||||
except json.JSONDecodeError:
|
except json.JSONDecodeError:
|
||||||
logger.error("The response was not valid JSON")
|
logger.error(
|
||||||
|
"The server returned a non-JSON response", status_code=response.status_code, reason=response.reason
|
||||||
|
)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if response.status_code != constants.HTTP_OK:
|
if response.status_code != constants.HTTP_OK:
|
||||||
|
|||||||
Reference in New Issue
Block a user