feat: Add debug information

This commit is contained in:
moanos [he/him] 2025-01-26 18:00:23 +01:00
parent 03a48da355
commit ad06829c31

View File

@ -67,7 +67,7 @@ def send_to_api(data, endpoint, headers):
if response.status_code == 201: if response.status_code == 201:
print(f"Success: Shelter '{data['name']}' uploaded.") print(f"Success: Shelter '{data['name']}' uploaded.")
elif response.status_code == 400: elif response.status_code == 400:
print(f"Error: Shelter '{data['name']}' already exists or invalid data.") print(f"Error: Shelter '{data['name']}' already exists or invalid data. {response.text}")
else: else:
print(f"Unexpected Error: {response.status_code} - {response.text}") print(f"Unexpected Error: {response.status_code} - {response.text}")
raise ConnectionError raise ConnectionError