(Title should read 404 not 4040)
Hi
If I use <arc:call op="httpGet" in="http"> , will a 404 response raise an exception which I need to catch or can I check the http:statuscode ?
(Title should read 404 not 4040)
Hi
If I use <arc:call op="httpGet" in="http"> , will a 404 response raise an exception which I need to catch or can I check the http:statuscode ?
Best answer by James B
In ArcScript, the body of the HTTP error is not returned with the exception code, but you can see the response error if you enable the logging for the connector:
<!-- read this log after the fact -->
<arc:set attr="http.logfile" value="/somepath/HTTPLog.txt" />
<arc:set attr="http.verbosity" value="3" />
<arc:set attr="http.URL" value="https://SomeURL" />
<arc:set attr="http.user" value="user" />
<arc:set attr="http.password" value="password" />
<arc:call op="httpGet" in="http" out="response">
<arc:set attr="output.data" value="[response.http:content]" />
</arc:call>
<arc:set attr="output.filename" value="httpResponseContent.txt" />
<arc:push item="output" />
But there is not a real time examination of the HTTP body of a 4xx error in the exception thrown.
The REST connector is a better way in the flow to manage endpoints that return a body that you need to examine - in the Advanced tab, you will find an option to create output messages for errors so you can act according to the body of the error reply:

Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.