I am not able to catch the SSLHandshakeException within the catch block and suspect it to be the asynchronous nature of AsynchronousJiraRestClientFactory. Any thoughts on getting it right. I want to execute a retry operation on catching the exception.
try {
URI jiraServerUri = URI.create(uri);
JiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();
JiraRestClient restClient = factory.createWithBasicHttpAuthentication(jiraServerUri, username, password);
return restClient;
} catch (Exception e) {
logger.error("Caught exception ", e);
throw e;
}