diff --git a/impl/src/main/java/com/jfrog/bintray/client/impl/handle/BintrayImpl.java b/impl/src/main/java/com/jfrog/bintray/client/impl/handle/BintrayImpl.java index 965577e..961620f 100644 --- a/impl/src/main/java/com/jfrog/bintray/client/impl/handle/BintrayImpl.java +++ b/impl/src/main/java/com/jfrog/bintray/client/impl/handle/BintrayImpl.java @@ -305,7 +305,8 @@ private HttpResponse execute(HttpUriRequest request, HttpClientContext context) //Underlying IOException form the client String underlyingCause = (ioe.getCause() == null) ? "" : ioe.toString() + " : " + ioe.getCause().getMessage(); log.debug("{}", ioe.getMessage(), ioe); - throw new BintrayCallException(400, ioe.getMessage(), underlyingCause); + String errorMsg = (underlyingCause != "") ? underlyingCause : ioe.getMessage(); + throw new BintrayCallException(400, ioe.getMessage(), errorMsg); } }