give error if no ref/elections are retrieved