What constitutes an error from a JSON call?
If I put rubbish in the URL I can trigger an error, but if I change one value of the HTTP URL, e.g. drop the ‘H’ from HTTP it doesn’t error.
This is also true if my URL is ‘behind’ a VPN. If my JSON call works ok when I call it with the VPN on, as the resource is in my office and I need a VPN tunnel to ‘see it’, when I switch the VPN off, I would expect to get an error, but I get nothing (that I can see).
Thanks
3 answers
Hello Tony,
Since ForeUI simulation uses JQuery to send AJAX request, the issue you are facing is actually inherited from JQuery.
You can find some related discussion about this on Internet. It seems that adding a timeout is the only way to detect this kind of error (URL incorrect or not accesable). We will try to improve this in next release, maybe by adding a timeout parameter for the Get JSON Object action.
Thanks ViVi
I think adding a timeout parameter to the JSON object is a great idea.
I have tried to create a timeout for myself, but failed. I think it is because the JSON object action fails silently, thus any actions after that don’t operate.
Any bright ideas of how I may be able to get around this?
Hi Tony,
For sure you can adding your own timeout. The only difficulty is that you have to simulate the “Multi-Thread” system. By default the simulation behavior is in single thread, but you can simulate multiple threads by defining duplicated events. Here is an working example:
If you modify the request URL a little bit, and make it inaccessible, you will get a timeout.
ForeUI will give you a warning when you have duplicated events for same element, but never mind, you can just ignore it.
-
Thanks. I'll try that.
This question is now closed