From 0251d104476561cf6e45aa3652e1175af811ad27 Mon Sep 17 00:00:00 2001 From: Baptiste Mathus Date: Thu, 14 Sep 2017 15:42:09 +0200 Subject: [PATCH] Chain the cause exception and log in case of failure --- .../plugins/github_branch_source/GitHubSCMSource.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java b/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java index 966a54b367..51695c06c6 100644 --- a/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java +++ b/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java @@ -1019,6 +1019,9 @@ private void checkApiUrlValidity(GitHub github) throws IOException { github.checkApiUrlValidity(); } catch (HttpException e) { String message = String.format("It seems %s is unreachable", apiUri == null ? GITHUB_URL : apiUri); + AbortException abortException = new AbortException(message); + abortException.initCause(e); + LOGGER.log(Level.WARNING, "Issue while checking GitHub URL validity", e); throw new AbortException(message); } }