Error messages thrown during the search request handling should be somewhat passed on, e.g.:
curl \
-k \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer secret-token:PIPeJGUt7c00ENn8a5uDlc" \
-d '{"debug": true, "steps": [{"type": "elasticsearch-query-dsl-mixin", "query": {"query": {"match": {"description": {"query": "lily"}}}}}]}' \
https://reference-dataset.ember-nexus.dev/search
Results in this error:
{
"type": "http://reference-dataset.ember-nexus.dev/error/500/internal-server-error",
"title": "Internal server error",
"status": 500,
"detail": "Internal server error, see log."
}
Which is not useful at all.
The corresponding error inside the server's log file is:
Exception of type Elastic\Elasticsearch\Exception\ClientResponseException got thrown during search step 1 (type
elasticsearch-query-dsl-mixin): 400 Bad Request: {"error":{"root_cause":[{"type":"parsing_exception","reason":"unknown
query [query]","line":1,"col":73}],"type":"x_content_parse_exception","reason":"[1:73] [bool] failed to parse field
[must]","caused_by":{"type":"parsing_exception","reason":"unknown query [query]","line":1,"col":73,"caused_by":{"type":
"named_object_not_found_exception","reason":"[1:73] unknown field [query]"}}},"status":400}
Acceptance criteria:
Error messages thrown during the search request handling should be somewhat passed on, e.g.:
Results in this error:
{ "type": "http://reference-dataset.ember-nexus.dev/error/500/internal-server-error", "title": "Internal server error", "status": 500, "detail": "Internal server error, see log." }Which is not useful at all.
The corresponding error inside the server's log file is:
Exception of type Elastic\Elasticsearch\Exception\ClientResponseException got thrown during search step 1 (type elasticsearch-query-dsl-mixin): 400 Bad Request: {"error":{"root_cause":[{"type":"parsing_exception","reason":"unknown query [query]","line":1,"col":73}],"type":"x_content_parse_exception","reason":"[1:73] [bool] failed to parse field [must]","caused_by":{"type":"parsing_exception","reason":"unknown query [query]","line":1,"col":73,"caused_by":{"type": "named_object_not_found_exception","reason":"[1:73] unknown field [query]"}}},"status":400}Acceptance criteria: