Hi everyone , I am calling a restlet script from a...
# suitescript
a
Hi everyone , I am calling a restlet script from a suitelet script , it is throwing the following error upon execution
{"type":"error.SuiteScriptError","name":"SSS_REQUEST_TIME_EXCEEDED","message":"The host you are trying to connect to has exceeded the maximum allowed response time.","stack":["createError(N/error)",
is there anyway to solve this issue .
b
basic option is to put the code you want to share in a custom module that is shared between the restlet and suitelet
although the particular error you are seeing means that your restlet is taking too long
a
i am sending data to restlet inside a loop i.e an array of 15 is being sent on every iteration . in some iterations there is no
SSS_REQUEST_TIME_EXCEEDED
error while in some iteration there is . shall i reduce the array size to avoid this error .. could this error be due to errors inside restlet for a particular data array.
b
depends on your restlet, but generally an error that throws will return an error response
a
Thanks for help 👍
n
Are you sending one request per array item? If so then reducing the array will not not help since it's the individual calls that are on some occasions causing the time out. If a specific array item is consistently causing the issue I'd log what is happening in the RESTlet incase it's failing silently somehow or processing to the point it's breaking the response time and figure out what you need to do to resolve it from that side. Could be you need to do more pre-processing in the SuiteLet.
👍 1
a
@NElliott yes , there is an error in restlet for some array items .. thats the reason i guess..