Skip to content

Commit

Permalink
Push exception type in the list of errors
Browse files Browse the repository at this point in the history
Signed-off-by: Megha Goyal <[email protected]>
  • Loading branch information
goyamegh committed Feb 19, 2024
1 parent c4e9920 commit b945e64
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static OpenSearchException wrap(List<Exception> ex) {

XContentBuilder builder = XContentFactory.jsonBuilder().startObject();
for (Exception e: ex) {
builder.field("error", e.getMessage());
builder.field(e.getClass().getSimpleName(), e.getMessage());
log.warn("[CUSTOMER ERROR] Security Analytics error:", e);
}
builder.endObject();
Expand Down

0 comments on commit b945e64

Please sign in to comment.