make query route fail to execute if query is empty