seeing if the query failed or succeded