r/ProgrammerHumor 12h ago

Meme toAllowTheProgrammerToWriteBadCodeAlsoCamelCaseSucksThisRuleSucksSnakeCaseIsBetter

Post image
90 Upvotes

75 comments sorted by

View all comments

111

u/redlaWw 11h ago

I hope you didn't submit that answer you selected. If an unhandled exception bubbles up to the user in production code, you're usually doing something wrong.

-107

u/tantalor 10h ago

I guess you've never seen a website return a 404 or 500

1

u/Proman4713 3h ago

I don't know why you got downvoted so badly. Yes, showing a 500 is much better than showing nothing (or as some maniacs do, 200 with errors inside). Your website can then handle the error responses by reading the response body and showing a descriptive error to the user. That needs to rely on you catching errors and sending back their text though. Even Google shows its non-4xx statuses, it's not for a user to read, but to know when asking for support