GoogleChrome / webstatus.dev

A tool to monitor and track the status of all Web Platform features across dimensions that are related to availability and implementation quality across browsers, and adoption by web developers.
https://webstatus.dev
Apache License 2.0
74 stars 3 forks source link

[Bug] Invalid queries returning 5xx errors #286

Open jcscottiii opened 1 month ago

jcscottiii commented 1 month ago

Expected behavior

Actual behavior

Other notes:

jcscottiii commented 1 month ago

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
jcscottiii commented 3 weeks ago

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 -. We need a new way to detect if the - is by itself then return a 400

The last two queries are similar to the original report where the user submitted available_on without the colon. Since this is happening more, I wonder if there is something we can do on the frontend to prevent the users from thinking available_on is okay to submit by itself.

jcscottiii commented 3 weeks ago

Definition of done for this bug:

past commented 2 weeks ago

If this is not urgent I can look into it in the next few days/weeks.