You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: Duplicate website/customer/vendor add throws a raw Error (not ConvexError) → uncaught Server Error in the client console #1993
Adding a website (or customer/vendor) whose normalized identifier already exists rejects correctly in the UI (destructive toast, no duplicate row created), but the rejection is a plain throw new Error(...) rather than a ConvexError, so it is logged to the client console as an uncaught Convex Server Error. Downstream the UI relies on fragile string-matching of the message.
Steps to reproduce
Add a website with domain X → success.
Add the same domain X again → toast "This website has already been added", no dup row, BUT the console logs an uncaught server fault.
Expected behavior
Expected business rejections use ConvexError with a typed code (no uncaught Server Error in the console; no string-matching needed downstream).
Affected service
Platform (web app)
Version or commit
cd13268b8
Browser and OS
Headless Chrome (Playwright) on macOS
Relevant log output / evidence
services/platform/convex/websites/create_website.ts:43 — throw new Error("Website with domain … already exists"). The sibling create/update/delete/bulk paths for customers and vendors (and the secret/title validators) follow the same raw-Error pattern.
Fix. Throw ConvexError({ code: 'DUPLICATE_…' }) from these paths and match on the code, not the message string.
Filed by an automated deep manual-QA sweep (wave 2) on a local hermetic stack (commit cd13268b8, mode-A mock LLM, headless Chrome). Reproduced before filing.
Activity
fix(platform): throw ConvexError for customer and vendor duplicate-add (
fix(platform): reject duplicate customer add on the reachable create …
fix(platform): drop deleted create_customer_public from generated con…
fix(platform): throw ConvexError for customer and vendor duplicate-add (