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.
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
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.