Commit ab5f0159 authored by Shikhar Bhushan's avatar Shikhar Bhushan
Browse files

MINOR: Include error message from ES when fail to create mapping

parent 3be1adee
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ public class Mapping {
    PutMapping putMapping = new PutMapping.Builder(index, type, obj.toString()).build();
    JestResult result = client.execute(putMapping);
    if (!result.isSucceeded()) {
      throw new ConnectException("Cannot create mapping:" + obj.toString());
      throw new ConnectException("Cannot create mapping " + obj + " -- " + result.getErrorMessage());
    }
  }