Adding a thrown error when there are no candidates