Web: Return 404 if query is invalid