Closed kderusso closed 1 week ago
Pinging @elastic/es-search-foundations (Team:Search Foundations)
This looks like a duplicate of https://github.com/elastic/elasticsearch/issues/111542
@rjernst I added a new bug because the proposed fix PR specifically catches an EOF Exception, whereas an IllegalStateException is thrown here.
Thanks @kderusso, I see the distinction now. However, looking at this more, I do not think it is a bug in the json parser. The parser is at an open array token, but the match query asked to parse the current object. It looks like a bug in match query, it should not call parser.objectText()
, but instead throw its own parse exception explaining what state it expected (ie, a json object). I think this is labeled correctly for the search team, so I'll leave it to them to decide how to handle it.
I relabelled based on the latest explanation that the query parser should be updated.
Pinging @elastic/es-search-relevance (Team:Search Relevance)
Elasticsearch Version
Latest main
Installed Plugins
No response
Java Version
bundled
OS Version
Serverless and cloud
Problem Description
Invalid Json that results in an
IllegalStateException
when parsing return 500 status codes and should return 4xx status codes as this indicates invalid output.This issue is similar to https://github.com/elastic/elasticsearch/issues/111542 but slightly different as that issue is due to an EOF exception.
Steps to Reproduce
Use the following command to reproduce:
The curl response is:
Logs (if relevant)
No response