Inconsistent handling of invalid rendered JSON in search template APIs #101477
Labels
>bug
:Search/Search
Search-related issues that do not fall into other categories
Team:Search
Meta label for search team
Elasticsearch Version
8.10.4
Installed Plugins
No response
Java Version
bundled
OS Version
Cloud
Problem Description
The search template API and render search template API handle invalid rendered JSON differently.
The search template API (correctly) returns a
400
response, while the render search template API returns a500
response. This is due to the fact that the render search template API implementation returns early from the convert method, skipping the code that would throwXContentParseException
.Steps to Reproduce
Observe the
400
response:Observe the
500
response:Logs (if relevant)
No response
The text was updated successfully, but these errors were encountered: