opensearch-project / opensearch-project/opensearch-java
[BUG] ResponseException binary response is parsed as string
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 165
- Forks
- 250
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 26
Description
When requesting binary response data:
optionsBuilder.addHeader("Accept", "application/cbor");
Any ResponseException will be read as a string instead of the requested format.
This leads to malformed error messages, such as:
org.opensearch.client.ResponseException: method [POST], host [http://localhost:9200], URI [/index/_search], status line [HTTP/1.1 400 Bad Request] ¿eerror¿jroot_cause¿dtypeqparsing_exceptionfreasonx_unknown query[...]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported binary response request with an application/cbor Accept header and an error response. Trace how ResponseException reads and represents the response, then verify that the requested format is preserved instead of being decoded as a string. Done means malformed error messages no longer occur for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100