Loop until text found on page waiting for update


I have a UI.Vision script that works where it enters a value, clicks to update the page with information based on that value, waits 4.5 seconds and then downloads the data. I wanted to replace the 4.5 second wait with a loop where it repeatedly checks for the value to appear on the page instead of holding things up for longer than needed or misses the data entirely.

I found this logic which worked (and no loop needed) with one drawback:

"Name": "TEMP",
"CreationDate": "2021-12-23",
"Commands": [
    "Command": "click",
    "Target": "xpath=//*[contains(.,\"299999\")][1]/td[5]",
    "Value": ""        


If no data is returned, though this is rare, it will time out and stop the script. The script also currently stops when this happens when the script tries to click to download the data when none is there too. Is there anyway to ignore these timeouts and errors?

Any help is appreciated.