scoped_search
scoped_search copied to clipboard
Show a specific error for an unintended "not null" query
The same error and message is used for many different ambiguous query compositions. In the case of the has
keyword, it's such a common part of speech that it could inadvertently creep into a naïve query: "walter has a big nose" might throw the same error (unless you have a column in your database named a
) as many other cases. This makes it difficult to understand, since that generic error message is designed to serve so many purposes.
This PR introduces a specific error to be used for a missing or unmatched field, and the error message includes both the parent class and the specific token which has been interpreted as a field name by the query builder.