Page 1 of 1

REST error and how to trap for it

Posted: Wed Dec 16, 2020 6:56 pm
by xavram
I have a simple macro that plays sounds via Syrinscape

[h, if(getLibProperty("SoundsEnabled") == "1"), code : {
[h : baseUrl = baseUrl + "/play/?auth_token=" + getLibProperty("SoundAuthToken")]
[h : REST.get(baseUrl)]
}]

Every now and then, I get an error that looks like...

Unable to process function "REST.get", An Exception has occurred: java.net.SocketTimeoutException: timeout

Is there any way to trap for this error and if it happens, just go on and don't play the sound but let the rest of the macro continue to process?