Files
talktime/backend
patrickandClaude Sonnet 5 94b25bcc36 fix(PROJ-11): BUG-24 — duplicate team-member add returned 500, not 409
First attempt checked err.code, which is undefined — drizzle-orm wraps
the raw pg error (the one that actually has .code = '23505' for a
unique violation) in .cause. Live-tested and caught before assuming
the fix worked from code review alone. Now checks err.cause?.code
first, falls back to err.code.

Verified: first add 201, duplicate add 409 "Member is already on this
team" instead of 500.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0143yYvjesjHndBACoweyK67
2026-09-11 23:55:29 +02:00
..