Comment by According-Ad1997 on 27/01/2025 at 01:10 UTC

87 upvotes, 3 direct replies (showing 3)

View submission: Massive Failure on the Product

View parent comment

It seems they stored guest users and actual permanent users in the same table, and the table had unique constraints on email. When returning guest users tried to sign up for an account, the db probably threw a unique constraint violation error and rejected the sign up since the email was taken.

All in all, this is a bad thing to happen on roll out but not the worst, especially if the product is good. People will come back. It should be easily fixable if you can identify guest users.

Replies

Comment by GamblingAssetsGoBRrr at 27/01/2025 at 01:38 UTC

25 upvotes, 1 direct replies

I wanna know how many startups have failed because a simple backend fix like this one

Comment by SpeedCola at 27/01/2025 at 12:35 UTC

5 upvotes, 1 direct replies

Yeah I wasn't wanting to know why this was a death nail for their project. Fix the issue and send out a batch email explaining the mishap and offer returning users something for their time and understanding.

Comment by matticusrex at 27/01/2025 at 12:52 UTC

3 upvotes, 0 direct replies

When you deal with entities (things that have unique identifiers) you want to use upsert logic ie in postgres:

insert … on conflict (column) do update set email = :user.email