Articles tagged 'error handling'
April 27, 2012
This post was originally published in the Rambling Labs Blog on April 27, 2012.
As I explained before on the Rails 3.1 - Adding custom 404 and 500 error pages post, sometimes you might want to have a custom way to handle your not found and internal server errors. In that case we wanted to show the error with a custom template.
But, what if I have an important site from which I want to be notified if there is any error raised? There are a couple of gems for this. The one I’m most familiar with is
exception_notificationgem, which is easily configured as it is depicted on its README.
This gem is added to the rails middleware stack and will capture any raised error and send you an email notifying about it.
However, someone pointed out…
January 5, 2012
This post was originally published in the Rambling Labs Blog on January 5, 2012.
Something that we didn’t have the chance to implement on our current projects (but that we will be including soon), is adding custom error pages to the site. So far, what we were looking for was two things: a custom 404 error page and a custom generic 500 error page.
For the experience I have now with Rails, I thought this would be a piece of cake. Well, in fact… it would’ve been if we were using Rails 2. But guess what? The error handling behavior in Rails 3 is not what you would expect. Even worse, it’s broken for routing errors!
For what I could…