Details
Description
In FTS, the response format varies depending on the response code:
- correct requests return HTTP 200 and have a well-defined response format in json
- malformed requests (eg. syntax errors) return HTTP 400 but with a - seemingly more freeform - text/plain response
It would make sense to try and have an uniform response format. For example, the text/plain could be transformed and made part of the "status" section of the json response. Please also consider mirroring the whole 1st level of the 200 response, with empty arrays for hits, facets, etc...
Typically the HTTP code would still be useful to quickly differentiate between a FATAL error vs execution-time errors or success. HTTP 400 would be reflected in "status": "total" == "failed", "success" == 0. Maybe a status string would also make sense at top level?
Attachments
Issue Links
- relates to
-
MB-41088 Creating error codes for common FTS errors
- Closed