David - Musings of an SRE

Viewing custom/default error pages on development mode

Working in development environment, we tend to miss out seeing production-level 404, 500 etc. error codes.By changing the following line to false in your config/environments/development.rb

config.action_controller.consider_all_requests_local = true

We get to display your custom/default error pages instead of an all so information stack trace. Perfectline Blog explains

By default, Rails displays the error pages only in production mode. In development mode you get the all-so-informational exception descriptions and stacktraces.
This behavior boils down to Rails either considering your request local (and displaying the full debug message) or “remote” (which means the application is probably in production and/or the debug messages should not be displayed). You can control this by changing your environment specific configuration.