mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 18:35:25 +00:00
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
|
@Override
|
||||||
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
|
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
|
||||||
builder.startObject();
|
builder.startObject();
|
||||||
ElasticsearchException.toXContent(builder, params, cause);
|
ElasticsearchException.generateThrowableXContent(builder, params, cause);
|
||||||
builder.endObject();
|
builder.endObject();
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
@ -61,8 +61,7 @@ public class ExportException extends ElasticsearchException implements Iterable<
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void innerToXContent(XContentBuilder builder, Params params) throws IOException {
|
protected void metadataToXContent(XContentBuilder builder, Params params) throws IOException {
|
||||||
super.innerToXContent(builder, params);
|
|
||||||
if (hasExportExceptions()) {
|
if (hasExportExceptions()) {
|
||||||
builder.startArray("exceptions");
|
builder.startArray("exceptions");
|
||||||
for (ExportException exception : exceptions) {
|
for (ExportException exception : exceptions) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user