Area
services/platform/convex/threads/share_thread.ts, threads/fork_thread.ts, threads/fork_own_thread.ts, threads/create_branch_thread.ts, threads/mutations.ts.
Steps to reproduce
- Attempt to share a thread that is archived, an arena thread, or a branch thread.
- Attempt to fork a shared thread with an invalid token or as a non-member of the owning org.
- Attempt to branch/create-arena on a thread you do not own.
- Any rejection surfaces as an opaque "Server Error" in the client console.
Expected
All user-facing conditions should throw ConvexError({ code: ... }) so the UI can render actionable error messages.
Actual
Raw new Error(string) throws in all public thread mutation handlers:
share_thread.ts:15 — Unauthenticated
share_thread.ts:24 — Thread not found
share_thread.ts:28 — Not authorized to share this thread
share_thread.ts:32 — Cannot share an archived thread
share_thread.ts:36 — Cannot share arena mode threads
share_thread.ts:40 — Cannot share branch threads
share_thread.ts:78-95 — unshareThread: Unauthenticated, Thread not found, Not authorized
fork_thread.ts:22 — Unauthenticated
fork_thread.ts:26 — Invalid share token
fork_thread.ts:35/46 — Shared thread not found (org membership gate)
fork_own_thread.ts:19 — Unauthenticated
fork_own_thread.ts:28 — Thread not found
fork_own_thread.ts:33 — Not authorized to fork this thread
create_branch_thread.ts:33 — Source thread not found
create_branch_thread.ts:37 — Not authorized to branch this thread
threads/mutations.ts:116-123 — Thread not found (createArenaThread)
Evidence
services/platform/convex/threads/share_thread.ts:15-40 and :78-95
services/platform/convex/threads/fork_thread.ts:22-46
services/platform/convex/threads/fork_own_thread.ts:19-33
services/platform/convex/threads/create_branch_thread.ts:33-37
services/platform/convex/threads/mutations.ts:116-123
Notes
tasks/mutations.ts uses ConvexError({ code: 'UNAUTHENTICATED' }) etc. as the established pattern for this codebase.
Area
services/platform/convex/threads/share_thread.ts,threads/fork_thread.ts,threads/fork_own_thread.ts,threads/create_branch_thread.ts,threads/mutations.ts.Steps to reproduce
Expected
All user-facing conditions should throw
ConvexError({ code: ... })so the UI can render actionable error messages.Actual
Raw
new Error(string)throws in all public thread mutation handlers:share_thread.ts:15— Unauthenticatedshare_thread.ts:24— Thread not foundshare_thread.ts:28— Not authorized to share this threadshare_thread.ts:32— Cannot share an archived threadshare_thread.ts:36— Cannot share arena mode threadsshare_thread.ts:40— Cannot share branch threadsshare_thread.ts:78-95—unshareThread: Unauthenticated, Thread not found, Not authorizedfork_thread.ts:22— Unauthenticatedfork_thread.ts:26— Invalid share tokenfork_thread.ts:35/46— Shared thread not found (org membership gate)fork_own_thread.ts:19— Unauthenticatedfork_own_thread.ts:28— Thread not foundfork_own_thread.ts:33— Not authorized to fork this threadcreate_branch_thread.ts:33— Source thread not foundcreate_branch_thread.ts:37— Not authorized to branch this threadthreads/mutations.ts:116-123— Thread not found (createArenaThread)Evidence
services/platform/convex/threads/share_thread.ts:15-40and:78-95services/platform/convex/threads/fork_thread.ts:22-46services/platform/convex/threads/fork_own_thread.ts:19-33services/platform/convex/threads/create_branch_thread.ts:33-37services/platform/convex/threads/mutations.ts:116-123Notes
tasks/mutations.tsusesConvexError({ code: 'UNAUTHENTICATED' })etc. as the established pattern for this codebase.