-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Invalid queries returning 5xx errors #286
Comments
It is likely getting caught in the ANY_VALUE term May need to change the grammar to be something like this: search_criteria:
generic_search_term
- | ANY_VALUE; // Default to ANY_VALUE search without "name:" prefix.
+ | ('name:' ANY_VALUE); // Implicit name search for ANY_VALUE |
From the Jun 11, 2024 error report Here are some other invalid queries that should return 4xx instead of 5xx
For the first two queries, there was a trailing The last two queries are similar to the original report where the user submitted |
If this is not urgent I can look into it in the next few days/weeks. |
From Oct 21 report. Queries that should be returning 4xx instead of 5xx |
From Nov 20 report: Query: |
New report: A few things happening:
|
When a string is missing the colon or value for a term, the parser still reaches the visitor method with a nil value node. This adds nil checks to handle these cases and returns an error. Test cases have been added to address the reported issues in #286. Possible future improvement: Explore grammar modifications to prevent these invalid inputs at the parser level.
) * Handle missing values in grammar terms with nil checks in visitor When a string is missing the colon or value for a term, the parser still reaches the visitor method with a nil value node. This adds nil checks to handle these cases and returns an error. Test cases have been added to address the reported issues in #286. Possible future improvement: Explore grammar modifications to prevent these invalid inputs at the parser level. * address feedback
Expected behavior
available_on
without the colon and valueActual behavior
available_on
without the colon and valueOther notes:
available_on:
) returns a 400 error like expectedThe text was updated successfully, but these errors were encountered: