I\'m building a Ruby on Rails api using Ruby 2.0 and Rails 4.0. My app is almost solely a JSON API, so if an error occurs (500, 404), I want to capture that error and return
Try this if you want respond to all types of errors in the same way
rescue_from StandardError, :with => :error_render_method
If you don't want this behavior in your development mode, add the above code under
unless Rails.application.config.consider_all_requests_local