Skip to content

Commit d9e8960

Browse files
Change the output error message back to use OpenSearchException in the cause chain (#5081) (#5085)
Signed-off-by: Xue Zhou <[email protected]> (cherry picked from commit d479853) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 877f891 commit d9e8960

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ public static void generateFailureXContent(XContentBuilder builder, Params param
603603
}
604604
t = t.getCause();
605605
}
606-
builder.field(ERROR, ExceptionsHelper.summaryMessage(e));
606+
builder.field(ERROR, ExceptionsHelper.summaryMessage(t != null ? t : e));
607607
return;
608608
}
609609

0 commit comments

Comments
 (0)