From 03991c785773760d0464a4e5a331e05eaf57449b Mon Sep 17 00:00:00 2001 From: David Kocher Date: Fri, 10 Jan 2025 10:57:32 +0100 Subject: [PATCH] Fix #284. --- .../sardine/impl/handler/MultiStatusResponseHandler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/github/sardine/impl/handler/MultiStatusResponseHandler.java b/src/main/java/com/github/sardine/impl/handler/MultiStatusResponseHandler.java index 87eefac5..cd1c190e 100644 --- a/src/main/java/com/github/sardine/impl/handler/MultiStatusResponseHandler.java +++ b/src/main/java/com/github/sardine/impl/handler/MultiStatusResponseHandler.java @@ -54,7 +54,9 @@ public Multistatus handleResponse(HttpResponse response) throws IOException } catch(IOException e) { // JAXB error unmarshalling response stream - throw new SardineException(e.getMessage(), statusLine.getStatusCode(), statusLine.getReasonPhrase()); + final SardineException sardineException = new SardineException(e.getMessage(), statusLine.getStatusCode(), statusLine.getReasonPhrase()); + sardineException.initCause(e); + throw sardineException; } }