diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py index ae01df5f6f7..7baac5d67c4 100644 --- a/addons/auth_oauth/controllers/main.py +++ b/addons/auth_oauth/controllers/main.py @@ -43,7 +43,7 @@ class OAuthController(openerpweb.Controller): url = "/#action=login&oauth_error=1" except Exception,e: # signup error - _logger.exception('oops') + _logger.exception("OAuth2: %s" % str(e)) url = "/#action=login&oauth_error=2" return openerp.addons.web.controllers.main.set_cookie_and_redirect(req, url) diff --git a/addons/auth_oauth/res_users.py b/addons/auth_oauth/res_users.py index fd26e89c2e3..124c46d687c 100644 --- a/addons/auth_oauth/res_users.py +++ b/addons/auth_oauth/res_users.py @@ -41,7 +41,7 @@ class res_users(osv.Model): validation = self.auth_oauth_rpc(cr, uid, p.validation_endpoint, access_token) if validation.get("error"): - raise openerp.exceptions.AccessDenied + raise Exception(validation['error']) if p.data_endpoint: data = self.auth_oauth_rpc(cr, uid, p.data_endpoint, access_token) validation.update(data)