respond to an exception raised in Rails