Source code isn’t written afresh every day. The point was the code was written at a different era and the current era wouldn’t produce this sort of code, and presumably you wouldn’t see anything but a generic 500. This is likely because product managers can’t stand free thought and action amongst engineers as it doesn’t appease their bean counter overlords sufficiently.
You don’t know when that was written.