Skip to content

Commit

Permalink
Conditionally throw exception from uploadParts failure. (#1595)
Browse files Browse the repository at this point in the history
Signed-off-by: Bala.FA <[email protected]>
  • Loading branch information
balamurugana authored Nov 26, 2024
1 parent d83557a commit 43ab4ae
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 43ab4ae

Please sign in to comment.