Search: Log event for InvalidQuery

Log a simple event when an InvalidQuery is handled on the search page.
This commit is contained in:
Florence Yeun
2015-04-17 10:47:39 -07:00
parent ad727b6d5e
commit 2e559675e2

View File

@@ -986,6 +986,8 @@ class FrontController(RedditController):
reverse=reverse,
count=count)
except InvalidQuery:
g.stats.simple_event('cloudsearch.error.invalidquery')
# Clean the search of characters that might be causing the
# InvalidQuery exception. If the cleaned search boils down
# to an empty string, the search code is expected to bail