Hi guys, I have a problem and just wondering if an...
# suitescript
n
Hi guys, I have a problem and just wondering if anyone had the same problem and if so how you solved it? Basically: Doing a
Copy code
<http://https.post|https.post>()
call to an external API from a SL, but it seems that the API I'm posting to takes a long time (around 10 seconds) to respond only the first time you do a call in a while, after that it answers in around 0,1 seconds. Same thing when I do calls to it from Postman. Problem in NS is that I never get to do the first call because I get SSS_CONNECTION_TIME_OUT as there's a 5 second limit in NetSuite for the initial contact. I guess this is why promise exists so you can do async calls but I really need to do this call from a server side script and promise is client side only... Anyone experienced this problem or have any ideas on what to do?
j
if the http request fails, retry it a couple times
👍 1
note that unfortunately in server script you cannot sleep to delay retries
👍 1