Use ElasticsearchException.generateThrowableXContent() and metadataToXContent() (elastic/elasticsearch#4655)
This is the x-pack siblings of elastic/elasticsearchelastic/elasticsearch#22611 Original commit: elastic/x-pack-elasticsearch@57924a6f1a
This commit is contained in:
parent
9e1f81d1e4
commit
06259f1836
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue