Skip to content

Commit 6fe0aa8

Browse files
committed
S3BlobContainer: Revert broadened exception handler again (#127405)
Catching `Exception` instead of `SdkException` in `copyBlob` and `executeMultipart` led to failures in `S3RepositoryAnalysisRestIT` due to the injected exceptions getting wrapped in `IOExceptions` that prevented them from being caught and handled in `BlobAnalyzeAction`. Repeat of #126731, regressed due to #126843 Closes #127399
1 parent 9969f56 commit 6fe0aa8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3BlobContainer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ private void executeMultipart(
582582
SocketAccess.doPrivilegedVoid(() -> clientReference.client().completeMultipartUpload(completeMultipartUploadRequest));
583583
}
584584
cleanupOnFailureActions.clear();
585-
} catch (final Exception e) {
585+
} catch (final SdkException e) {
586586
if (e instanceof SdkServiceException sse && sse.statusCode() == RestStatus.NOT_FOUND.getStatus()) {
587587
throw new NoSuchFileException(blobName, null, e.getMessage());
588588
}

0 commit comments

Comments
 (0)