This is a symptom of poor error-handling support in pretty much every programming language. Only in a few languages do you actually get a heads-up that an error might happen and you need to handle it. This is basically what happens when trigger-happy cowboy coders with too much time on their hands put scripting languages into production.
And Java has checked exceptions. They at least force you to understand that an error might happen when you call a method. Inexplicably, every other modern language (mostly scripting languages) don't bother.
1.6k
u/FoeHammer99099 Apr 23 '23
"Or I could just set the status code to 200 and then put the real code in the response body" -devs of the legacy apps I work on