Topic: How to handle OAuth::Unauthorized exception

Hi ,
I am using omniauth and omniauth-twitter gem to log in through twitter. In my twitter application, I have given the callback url as "". It is working properly when sign in to twitter but when I click on the "Cancel and Return", it is showing OAuth::Unauthorized exception.

Please find the following details.
On clicking the link in twitter side, it redirects to … oiUmLRaJuM

Showing the following exception

Started GET /auth/twitter/callback?denied=N3OLzjTKXqowsdZDo6Z5fsx3eVa4JALNsoiUmLRaJuM for at 2012-06-15 11:22:00 +0530
(twitter) Callback phase initiated.
(twitter) Authentication failure! invalid_credentials: OAuth::Unauthorized, 401 Unauthorized

OAuth::Unauthorized (401 Unauthorized):
Rendered /home/bachans/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.4ms)
Rendered /home/bachans/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.8ms)
Rendered /home/bachans/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (3.9ms)

Any suggestion on this, will be welcome.