elastic / elastic/elasticsearch-java

tasks.get endpoint fails to deserialize response when .response.failures array contains objects

Open
#331 1 comment 10 reactions 0 assignees View on GitHub
Area: Specification
Dominant language
Java
Stars
524
Forks
300
Avg merge
1d 11h
Merged PRs (30d)
16

Description

### Java API client version

8.2.3

### Java version

11

### Elasticsearch Version

8.2.0

### Problem description

When a response from the tasks.get endpoint includes a list of failures, `co.elastic.clients.elasticsearch.tasks.TaskStatus#failures` does not deserialize, and causes a `co.elastic.clients.json.UnexpectedJsonEventException` error. The response from the server is a list of Objects, but TaskStatus is expecting a list of Strings.
When it is deserialized, the following error message emitted:

> Unexpected JSON event 'START_OBJECT' instead of '[KEY_NAME, VALUE_STRING, VALUE_NUMBER, VALUE_TRUE, VALUE_FALSE]'

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.