Skip to content

Commit

Permalink
log exception message for failed getAccessToken (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrydboonstra authored and antony committed Jul 24, 2016
1 parent c057c2c commit f5e60a5
Showing 1 changed file with 4 additions and 3 deletions.
@@ -1,5 +1,6 @@
package uk.co.desirableobjects.oauth.scribe

import org.scribe.exceptions.OAuthException
import org.scribe.model.Token
import org.scribe.model.Verifier
import grails.web.servlet.mvc.GrailsParameterMap
Expand Down Expand Up @@ -35,8 +36,8 @@ class OauthController {

try {
accessToken = oauthService.getAccessToken(providerName, requestToken, verifier)
} catch (OAuthException) {
log.error("Cannot authenticate with oauth")
} catch(OAuthException ex){
log.error("Cannot authenticate with oauth: ${ex.toString()}")
return redirect(uri: provider.failureUri)
}

Expand Down Expand Up @@ -83,4 +84,4 @@ class OauthController {
RedirectHolder.setUri(params.redirectUrl)
return redirect(url: url)
}
}
}

0 comments on commit f5e60a5

Please sign in to comment.