News for hackers. Stuff that matters.
Re:I've been abusing HTTP Status Codes in my APIs for years by matsemann on Wednesday July 13, 2022 @10:10AM (#32082984)
Wow, 452 upvotes and 89 downvotes on your answer. Very controversial, indeed!

While I agree with you, I sometimes misuse 200 OK even for actual errors. Most times because whatever internal library I've used to do the requests have made it hard to parse the error data if it happens (just throws a general exception instead when it encounters a 4XX or 5XX). Or sometimes because the request failing is somewhat expected, but the client library then insists on doing lots of error handling when it fails (logging, alarms, circuit breakers and whatnot), polluting everything.

Re:I've been abusing HTTP Status Codes in my APIs for years by XCSme on Wednesday July 13, 2022 @11:47AM (#32084339)
TIL: You can view upvote/downvote count by clicking on the score. I only needed 12 years on SO to find this out...
Re:I've been abusing HTTP Status Codes in my APIs for years by nayuki on Wednesday July 13, 2022 @11:56AM (#32084479)
Re:I've been abusing HTTP Status Codes in my APIs for years by XCSme on Wednesday July 13, 2022 @12:08PM (#32084652)
I have like 25k points so I probably had this for a while now.
Re:I've been abusing HTTP Status Codes in my APIs for years by dariusj18 on Wednesday July 13, 2022 @01:48PM (#32086228)
Looks like HN people are changing that as we speak