updates hasErrors method to used fixed getErrors method