You misunderstand. If there is no success message the resulting array of filter() is empty. So [0] will fail.