ProgrammerHumor

yepThatsMe

yepThatsMe
https://i.redd.it/t16gqvuc4lcf1.png
Reddit

Discussion

No-Article-Particle

What are you doing indeed...

7 hours ago
Boris-Lip

Next compiler/framework/<insert whatever throws this shit here> update they change the message and this thing breaks. But you already know that, yet still doing it...

9 hours ago
adiXjinx OP

i seriously don't know what to do, like what can i do ?

9 hours ago
Boris-Lip

Is it a separate exception type? Catch a specific type then. Is there an error code instead of a message? Check against that error code. Etc.

8 hours ago
adiXjinx OP

waait!! wtf am i doing, username can't be updatable why tf i build that ahhh this whole time 😭️

8 hours ago
gorilla60rilla

lol this put a smile on my face, no hard feeling tho, just fun, I see myself in you. We should talk more with our duck bro

7 hours ago
adiXjinx OP

i don't have duck !!

4 hours ago
reginakinhi

That's the problem right there

1 hour ago
[deleted]

[deleted]

4 hours ago
Cyberuben

This would still have the possibility of race conditions, where you check, it’s available, another transaction commits, and now it’s not valid. Handling the unique constraint error the same as the pre-check should cover enough

3 hours ago
gameplayer55055

I usually do select 1 from tblUsers where username = @name

It still may not be the best method, so I rate limited auth just in case cool haxor decides to rape my db

If you're scared of race conditions, make an SP with a transaction for auth.

32 minutes ago
Ronin-s_Spirit
:js:

r/programmerhorror you mean.

2 hours ago
adiXjinx OP

ohhh sorry i uploded it at wrong place

1 hour ago
om_nama_shiva_31

Worst bait ever

23 minutes ago
adiXjinx OP

CodeRabbit

Fix typo in filename: "createResponce.ts" should be "createResponse.ts".

yess sure why not change every fuking file for a "s" ??

8 hours ago
kimochiiii_

don't you have some IDE that'll do it for you?

5 hours ago
adiXjinx OP

yeh i did it

4 hours ago