diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkResponse.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkResponse.java index 88b422e109d..4a483e504b7 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkResponse.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkResponse.java @@ -116,7 +116,7 @@ public class MonitoringBulkResponse extends ActionResponse { @Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { builder.startObject(); - ElasticsearchException.toXContent(builder, params, cause); + ElasticsearchException.generateThrowableXContent(builder, params, cause); builder.endObject(); return builder; } diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/ExportException.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/ExportException.java index 2f062bf4c85..16b87082374 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/ExportException.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/ExportException.java @@ -61,8 +61,7 @@ public class ExportException extends ElasticsearchException implements Iterable< } @Override - protected void innerToXContent(XContentBuilder builder, Params params) throws IOException { - super.innerToXContent(builder, params); + protected void metadataToXContent(XContentBuilder builder, Params params) throws IOException { if (hasExportExceptions()) { builder.startArray("exceptions"); for (ExportException exception : exceptions) {