Skip to content

Commit

Permalink
Conditionally throw exception from uploadParts failure.
Browse files Browse the repository at this point in the history
Fixes #1594

Signed-off-by: Bala.FA <[email protected]>
  • Loading branch information
balamurugana committed Nov 14, 2024
1 parent 8de1be7 commit 6a21e45
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions api/src/main/java/io/minio/S3Base.java
Original file line number Diff line number Diff line change
Expand Up @@ -2849,14 +2849,14 @@ private CompletableFuture<ObjectWriteResponse> putMultipartObjectAsync(
| XmlParserException
| InterruptedException
| ExecutionException e) {
Throwable throwable = e;
if (throwable instanceof ExecutionException) {
throwable = ((ExecutionException) throwable).getCause();
}
if (throwable instanceof CompletionException) {
throwable = ((CompletionException) throwable).getCause();
}
if (uploadId == null) {
Throwable throwable = e;
if (throwable instanceof ExecutionException) {
throwable = ((ExecutionException) throwable).getCause();
}
if (throwable instanceof CompletionException) {
throwable = ((CompletionException) throwable).getCause();
}
throw new CompletionException(throwable);
}
try {
Expand All @@ -2871,15 +2871,15 @@ private CompletableFuture<ObjectWriteResponse> putMultipartObjectAsync(
| XmlParserException
| InterruptedException
| ExecutionException ex) {
Throwable throwable = ex;
throwable = ex;
if (throwable instanceof ExecutionException) {
throwable = ((ExecutionException) throwable).getCause();
}
if (throwable instanceof CompletionException) {
throwable = ((CompletionException) throwable).getCause();
}
throw new CompletionException(throwable);
}
throw new CompletionException(throwable);
}
return response;
});
Expand Down

0 comments on commit 6a21e45

Please sign in to comment.