Skip to content

Commit

Permalink
Merge pull request #833 from /issues/828-exception-logging
Browse files Browse the repository at this point in the history
Fix #828: Missing exception logging
  • Loading branch information
romanstrobl authored Aug 28, 2020
2 parents 9849eb0 + 1b4d18f commit 675d36a
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.ssl.SSLContextBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import org.springframework.social.oauth2.OAuth2Template;
import org.springframework.util.ResourceUtils;
Expand All @@ -41,6 +43,8 @@
*/
public class DefaultAuthApiTemplate extends OAuth2Template {

private static final Logger logger = LoggerFactory.getLogger(DefaultAuthApiTemplate.class);

public DefaultAuthApiTemplate(String clientId, String clientSecret, String authorizeUrl, String accessTokenUrl) {
super(clientId, clientSecret, authorizeUrl, accessTokenUrl);
}
Expand All @@ -53,8 +57,8 @@ protected RestTemplate createRestTemplate() {
if (requestFactory != null) {
restTemplate.setRequestFactory(requestFactory);
}
} catch (IOException | UnrecoverableKeyException | CertificateException | NoSuchAlgorithmException | KeyStoreException | KeyManagementException e) {
//
} catch (IOException | UnrecoverableKeyException | CertificateException | NoSuchAlgorithmException | KeyStoreException | KeyManagementException ex) {
logger.warn(ex.getMessage(), ex);
}
return restTemplate;
}
Expand Down

0 comments on commit 675d36a

Please sign in to comment.