Skip to content

Commit

Permalink
refactor(artifact downloader): Chain root cause when rethrowing excep…
Browse files Browse the repository at this point in the history
…tion (#736)

* don't hide the root cause of artifact download failure to ease up troubleshooting
  • Loading branch information
jludvice committed Oct 16, 2020
1 parent b4a0f0e commit 45bfe2e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ public void downloadArtifactToFile(Artifact artifact, Path targetFile) throws IO
throw new IOException(
String.format(
"Failed to read input stream of downloaded artifact: %s. Error: %s",
artifact, e.getMessage()));
artifact, e.getMessage()),
e);
}
} catch (RetrofitError e) {
throw new IOException(
String.format("Failed to download artifact: %s. Error: %s", artifact, e.getMessage()));
String.format("Failed to download artifact: %s. Error: %s", artifact, e.getMessage()), e);
}
}
}

0 comments on commit 45bfe2e

Please sign in to comment.