You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we have an issue with hard-to-read error messages when incorrect payloads are sent to the /search endpoint. The goal of this task is to improve the error message and make it easier to identify the related issue in the payload, which may be large.
The error indicates that the 'query' field is missing. When we look into the documentation, we find that in match and struct fields, we should include a "query" field and an optional "operator" field. However, the docs don't explicitly state that we can't use a nested match with bool inside it, which isn't very obvious.
It seems like a good idea to improve our error message by pointing out exactly which structure we expect the query to be specified in. For example, if we expect it in match.*, we could provide the path to the original structure where the error occurred. This would be really helpful when investigating incorrectly built queries, especially since they can be quite nested and large.
Manticore Search Version:
Latest dev version
Operating System Version:
Ubuntu Jammy
Have you tried the latest development version?
Yes
Internal Checklist:
To be completed by the assignee. Check off tasks that have been completed or are not applicable.
Implementation completed
Tests developed
Documentation updated
Documentation reviewed
Changelog updated
The text was updated successfully, but these errors were encountered:
it worth to add full path to the node that causes error - that can be done by run another parsing pass after the initial error returned with additional argument to print \ collect full path from the recursive parsing.
Bug Description:
Currently, we have an issue with hard-to-read error messages when incorrect payloads are sent to the
/search
endpoint. The goal of this task is to improve the error message and make it easier to identify the related issue in the payload, which may be large.Here's an example I came up with:
When we send the request:
The error indicates that the 'query' field is missing. When we look into the documentation, we find that in match and struct fields, we should include a "query" field and an optional "operator" field. However, the docs don't explicitly state that we can't use a nested match with bool inside it, which isn't very obvious.
It seems like a good idea to improve our error message by pointing out exactly which structure we expect the query to be specified in. For example, if we expect it in match.*, we could provide the path to the original structure where the error occurred. This would be really helpful when investigating incorrectly built queries, especially since they can be quite nested and large.
Manticore Search Version:
Latest dev version
Operating System Version:
Ubuntu Jammy
Have you tried the latest development version?
Yes
Internal Checklist:
To be completed by the assignee. Check off tasks that have been completed or are not applicable.
The text was updated successfully, but these errors were encountered: