Skip to content

Commit

Permalink
Fix Painless exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
tvernum committed Jan 12, 2024
1 parent 888398e commit 8bb5d3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private ErrorCauseWrapper(Throwable realCause) {
this.realCause = realCause;
}

public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
protected XContentBuilder toXContent(XContentBuilder builder, Params params, int nestedLevel) throws IOException {
builder.field("type", getExceptionName(realCause));
builder.field("reason", realCause.getMessage());
return builder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ public static int getId(Class<? extends ElasticsearchException> exception) {
}

@Override
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
public final XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
return toXContent(builder, params, 0);
}

Expand Down

0 comments on commit 8bb5d3a

Please sign in to comment.