How can I rescue from an OAuth::Unauthorized exception as raised from OmniAuth in a Ruby on Rails application? I tried
rescue_from OAuth::Unauthorized, :with => :unauthorized
but it didn't work, I presume because the exception is not coming from inside the rails app but from omniauth (somewhere earlier in the rack chain? or at least, outside the rails app).
Any ideas how can I make my app display a better error message than the generic "Something went wrong" that's shipped with Rails?