Quantcast
Viewing all articles
Browse latest Browse all 145

ProviderSigninController swallows Exceptions?

Is there not a better way to preserve the content of this exception? Either by outputting log message or passing as query param or something?

Code:

        @RequestMapping(value="/{providerId}", method=RequestMethod.GET, params="oauth_token")
        public RedirectView oauth1Callback(@PathVariable String providerId, NativeWebRequest request) {
                try {
                        OAuth1ConnectionFactory<?> connectionFactory = (OAuth1ConnectionFactory<?>) connectionFactoryLocator.getConnectionFactory(providerId);
                        Connection<?> connection = webSupport.completeConnection(connectionFactory, request);
                        return handleSignIn(connection, request);
                } catch (Exception e) {
                        return redirect(URIBuilder.fromUri(signInUrl).queryParam("error", "provider").build().toString());
                }
        }


Viewing all articles
Browse latest Browse all 145

Trending Articles