mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 04:32:42 +00:00
The PUT /api/dashboard/widgets route surfaced only the first Zod issue on 422, which forced iOS clients debugging the widget-layout contract into one round-trip per wrong field. The route now wires the shared returnAllZodIssues helper so every issue lands in details.issues at once. Adds an append-only audit-ledger breadcrumb keyed dashboard.widgets.validation-failed so the operator can grep /api/admin/audit for the same trail outside the iOS dev console. The write is fire-and-forget — the validation response is the contract, the audit row is best-effort. Tests cover 2 + 3 simultaneous issues, audit-row shape, params-leak guard, and audit-write-rejection survival on both the unit and integration tiers.