wuvt / trackman

WUVT's track logging web-app
GNU Affero General Public License v3.0
4 stars 3 forks source link

Don't return 400 errors for search/autocomplete #77

Closed mutantmonkey closed 5 years ago

mutantmonkey commented 5 years ago

There are a few cases where Trackman clients may send searches that are empty. Instead of returning a 400 error, just return a 200 error with no results.

For autocomplete, we also do this if a field that we aren't able to search on (e.g. vinyl) is provided. This is actually in line with the existing search be behavior, which ignores fields it cannot search on. In the future though, we may change this behavior.

This was caught by our Sentry error logging.

g-i-g commented 5 years ago

Seems good to me!