Skip to content

ElasticsearchAsyncClient no return #927

Closed
@Swiftlyfisher

Description

@Swiftlyfisher

Elasticsearch Version

java client 8.17.0

Installed Plugins

No response

Java Version

21

OS Version

win10

Problem Description

esClient.indices()
.create(b -> b.index(index).withJson(json))
.whenComplete((r, e) -> {
if (e != null) Log.error("[EsQuery]: create index $index failed", e);
Log.info("[EsQuery]: create index $index success");
}

As above, if I pass in a syntax incorrect JSON, whenComplete will not be executed.

Steps to Reproduce

esClient.indices()
.create(b -> b.index(index).withJson(json))
.whenComplete((r, e) -> {
if (e != null) Log.error("[EsQuery]: create index $index failed", e);
Log.info("[EsQuery]: create index $index success");
}

As above, if I pass in a syntax incorrect JSON, whenComplete will not be executed.

Logs (if relevant)

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions