Logging Internal Server Errors
Code: 500 errors, error handling, errors, internal server errors, logging, Rails, rescue
A good rule of thumb for websites is that for every hundred users who runs into a bug, one will let you know. This is when the user can even recognize there’s an error because they get a big “500: Internal Server Error”. You might get more reports if you have a very small userbase who know you, but don’t count on it. You have to log errors if you want to find out about them, so here’s some code to do that in Rails.