I have an action that searches records based on a url parameter. The url for the action looks something like this:
http://domain.com/records/filter/<filtercode>
If the user enters an incorrect filtercode, I would like to app to
- raise an error so that Hoptoad will report to error to me.
- render a 404 instead of a 500 in production env.
I understand that certain Rails errors such as ActiveRecord::NotFound and ActionController:RoutingError will render 404 in production env. So what I like to do is raise this error when a user enters an invalid filtercode in the url.
Now, my question: what's the ideal error to raise in this type of situation? Is there a list of Rails errors/exceptions in the net?