This commit is contained in:
i 2026-02-07 13:50:59 +01:00
parent 4f4046e4a0
commit 716a565713
6 changed files with 1471 additions and 15 deletions

View file

@ -71,6 +71,7 @@ class BookingClient:
"customer_note": "",
"add_ons_by_service": {SERVICE_ID: [[]]},
"sub_bookings_by_service": {},
# INFO: changes every week: e.g. booking for a monday needs new id
# "booking_quota_grant_id":"24735199",
"booking_quota_grant_id": "24735202",
"strategy": "multi-resource",
@ -86,8 +87,10 @@ class BookingClient:
try:
data = booking.json().get("data", {})
except (ValueError, JSONDecodeError):
# print(f"❌ Invalid JSON response from booking request: {booking.text[:200]}")
print(f"❌ Invalid JSON response from booking request: {booking.text}")
if "Bad Request" in booking.text and "400" in booking.text:
print("❌ Bad Request 400 on Booking request.")
else:
print(f"❌ Invalid JSON response from booking request: {booking.text}")
return False
oid = data.get("id")