elastic / elasticsearch-cloud-aws

AWS Cloud Plugin for Elasticsearch
https://github.com/elastic/elasticsearch/tree/master/plugins/discovery-ec2
577 stars 181 forks source link

Do not embed and serialize AmazonClientExceptions #227

Closed tlrx closed 9 years ago

tlrx commented 9 years ago

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.

dakrone commented 9 years ago

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?

tlrx commented 9 years ago

@dakrone thanks! I merged with a comment.