In my game I am developing I have a popup that allows you to search for your friends username to start a game. I created a service to search for the username entered in the text input box and am using the "where" parameter for the query. I am also using Javascript on the "where" parameter to return the text inputted in the text box. The problem is no matter what name I put in the search box the service is returning a "Success" and creating a new game in the game collection of the database. I have and "Error" setup on the search service to alert that the username doesn't exist, but it always returns a success and creates a new game.