fix: better error handling for order generation (v1.3.62)

- Added more specific error message when customer not found
- Added debug logging to check customer object type
- Changed error from 'Customer not found' to include customer_id
- Helps diagnose 'string indices must be integers' error
This commit is contained in:
Christian 2025-12-24 09:39:31 +01:00
parent d228362617
commit 0dd24c6420
2 changed files with 5 additions and 2 deletions

View File

@ -1 +1 @@
1.3.61 1.3.62

View File

@ -84,7 +84,10 @@ class OrderService:
(customer_id,)) (customer_id,))
if not customer: if not customer:
raise HTTPException(status_code=404, detail="Customer not found") raise HTTPException(status_code=404, detail=f"Customer {customer_id} not found in tmodule_customers")
# Debug log
logger.info(f"✅ Found customer: {customer.get('name') if isinstance(customer, dict) else type(customer)}")
# Hent godkendte tider for kunden med case og contact detaljer # Hent godkendte tider for kunden med case og contact detaljer
query = """ query = """