PR #306 · pramaan-io/pramaan-app · merged 2026-06-11
A vague 'something went wrong' is worse than no error at all.
What breaks when the form can't tell the user which field is the problem.
Generic toast can't point to a field. String parsing is not a contract.
The fix — Typed errors light up the field. Generic errors leave the user guessing.
sequenceDiagram autonumber participant ui as Client UI participant bff as BFF Route participant gw as Gateway ui->>bff: Submit form bff->>gw: Create / update client gw->>bff: Typed GatewayError: email_in_use bff->>ui: Re-emit typed error ui->>ui: Map to primary email field