Skip to content

Commit d479853

Browse files
authored
Change the output error message back to use OpenSearchException in the cause chain (#5081)
Signed-off-by: Xue Zhou <[email protected]>
1 parent 657d559 commit d479853

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
129129
- Refactored BalancedAllocator.Balancer to LocalShardsBalancer ([#4761](https://github.com/opensearch-project/OpenSearch/pull/4761))
130130
- Fail weight update when decommission ongoing and fail decommission when attribute not weighed away ([#4839](https://github.com/opensearch-project/OpenSearch/pull/4839))
131131
- Skip SymbolicLinkPreservingTarIT when running on Windows ([#5023](https://github.com/opensearch-project/OpenSearch/pull/5023))
132+
- Change the output error message back to use OpenSearchException in the cause chain. ([#5081](https://github.com/opensearch-project/OpenSearch/pull/5081))
133+
132134
### Deprecated
133135
### Removed
134136
- Remove deprecated code to add node name into log pattern of log4j property file ([#4568](https://github.com/opensearch-project/OpenSearch/pull/4568))

server/src/main/java/org/opensearch/OpenSearchException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ public static void generateFailureXContent(XContentBuilder builder, Params param
588588
}
589589
t = t.getCause();
590590
}
591-
builder.field(ERROR, ExceptionsHelper.summaryMessage(e));
591+
builder.field(ERROR, ExceptionsHelper.summaryMessage(t != null ? t : e));
592592
return;
593593
}
594594

0 commit comments

Comments
 (0)