diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/common/blobstore/support/ImmutableAppendableBlobContainer.java b/modules/elasticsearch/src/main/java/org/elasticsearch/common/blobstore/support/ImmutableAppendableBlobContainer.java index 0f9698e9ba9..e540b8c3318 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/common/blobstore/support/ImmutableAppendableBlobContainer.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/common/blobstore/support/ImmutableAppendableBlobContainer.java @@ -53,8 +53,9 @@ public class ImmutableAppendableBlobContainer extends AbstractBlobContainer impl String partBlobName = blobName + ".a" + (part++); try { listener.withStream(out); - } catch (IOException e) { + } catch (Exception e) { listener.onFailure(e); + return; } FastByteArrayInputStream is = new FastByteArrayInputStream(out.unsafeByteArray(), 0, out.size()); container.writeBlob(partBlobName, is, out.size(), new ImmutableBlobContainer.WriterListener() {