Use pattern matching to improve rescue performance in controller actions