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:
parent
d228362617
commit
0dd24c6420
@ -84,7 +84,10 @@ class OrderService:
|
||||
(customer_id,))
|
||||
|
||||
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
|
||||
query = """
|
||||
|
||||
Loading…
Reference in New Issue
Block a user