Two bugs: 1. Python 3.12 name collision in schemas.py: `date: Optional[date] = None` caused get_type_hints() to resolve the `date` type annotation to NoneType (Optional[None]) because the field name shadowed the datetime.date import. All *Update schemas were rejecting any PUT with a valid date. Fixed by aliasing the import: `from datetime import date as Date`. 2. FastAPI validation errors return detail as a list of objects, not a string. Passing that list to new Error() produced "Error: [object Object]". Fixed in api.js to map the detail array to msg strings before throwing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
6.0 KiB
6.0 KiB