I have stumbled upon a situation where my application looks for an id that does not exist in the database. An exception is thrown. Of course, this is a pretty standard situation
Rails has a built-in rescue_from class method:
class CustomersController < ApplicationController rescue_from ActiveRecord::RecordNotFound, with: :index ... end