Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#331 1 comment 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
elasticsearch, java

Research direction

Start with the tasks.get endpoint and co.elastic.clients.elasticsearch.tasks.TaskStatus#failures, then reproduce deserialization using a response whose failures array contains objects. Trace the expected list element type and verify that the documented response deserializes without UnexpectedJsonEventException.

Written by the indexing model from the issue text.

Description

Area: Specification
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]'

Dominant language
Java
Stars
524
Forks
300
Avg merge
1h 19m
Merged PRs (30d)
16

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from elastic/elasticsearch-java

All issues in elastic/elasticsearch-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.