Since elastic/elasticsearch@a1d64922815c31cafe429a52a96f31c09dc7903a third party exceptions like AmazonClientException cannot be serialized and thus should not be embedded in IOException.
With the current behavior, AmazonClientException are embedded in IOException but a verification in LocalTransportChannel throws an assertion error, making the test AbstractS3SnapshotRestoreTest.assertRepositoryWithCustomCredentialsIsNotAccessibleByDefaultCredentials hangs forever.
LGTM, though maybe you want to add a comment on these lines about why it can't be a cause for the IOException so no one accidentally changes it in the future?
Since elastic/elasticsearch@a1d64922815c31cafe429a52a96f31c09dc7903a third party exceptions like
AmazonClientException
cannot be serialized and thus should not be embedded inIOException
.With the current behavior,
AmazonClientException
are embedded inIOException
but a verification in LocalTransportChannel throws an assertion error, making the testAbstractS3SnapshotRestoreTest.assertRepositoryWithCustomCredentialsIsNotAccessibleByDefaultCredentials
hangs forever.