Asked — Edited

Httpget - Site Not Available Error

Is there a way to trap the error message when you do an HTTPGET and the site is not available. Right now, if it cant get to the site it errors out and halts the script. I would like to just trap the error and keep the script running. is that possible?


ARC Pro

Upgrade to ARC Pro

Unleash your creativity with the power of easy robot programming using Synthiam ARC Pro

PRO
Synthiam
#1  

There's no error capturing in eZscript - the best way is to have the calling script check a variable to see if the httpget script was successful.

PRO
USA
#2  

DJ, another HTTPGET question. When I enter a URL in MS Edge browser it returns data, but when I use the HTTPGET command I get error 408 forbidden. Any idea as to why? Anything I can do to get around that?

PRO
USA
#3  

DJ, I said 408, I meant 403. This is what the doc says: "Getting 403s? You might need to make sure you are passing in proper headers, such as an accept header and acceptable user agent. Rule of thumb is that if a url is working in a browser, but not your application, you may need to modify your request to make it work."

Something fixable?

PRO
Synthiam
#4  

Most likely not. The server you are querying has a filter for bots and specific browsers. It's illegal for ARC to query on behalf of a browser (i.e. Impersonate a specific browser)