Visualsearch repetitive image found

I want to make: if ui vision fails to find an image then it will repeat and xclick again until the image appears but strangely it always gives an error when the image does not appear, I have tried using !erorignore but it still fails