Handling OAuth2 errors

This commit is contained in:
Valery Sizov 2016-12-09 16:59:23 +02:00
parent 89cc2064a2
commit 858ec60482

View file

@ -2,7 +2,7 @@ class Import::BitbucketController < Import::BaseController
before_action :verify_bitbucket_import_enabled
before_action :bitbucket_auth, except: :callback
rescue_from OAuth::Error, with: :bitbucket_unauthorized
rescue_from OAuth2::Error, with: :bitbucket_unauthorized
rescue_from Bitbucket::Error::Unauthorized, with: :bitbucket_unauthorized
def callback