Announcement Announcement Module
Collapse
No announcement yet.
ProviderSigninController swallows Exceptions? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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());
    		}
    	}

  • #2
    Log message, certainly. Could possibly pass more info in a query parameter, but the challenge is how to discern any meaningful value for that query parameter from an otherwise generic Exception. (And no, the answer is not to pass the FQE of the exception as a query parameter value.)

    There are a few issues in JIRA already for addressing better error handling around the signin flow. Therefore, there's no need to create a new issue for that. But, if you don't mind, could you create an improvement issue to request that the exception be logged?

    Comment

    Working...
    X