Flow design - REST API Socket Error code 1

Andr_1
Tera Contributor

Hello everyone,

 

I created a flow to send a REST message to an API, requesting some records and inserting them into a staging table.

When I run the workflow, the actions that send the request begin processing, and after 5 to 10 minutes, it generates the following error message:

Andr_1_0-1704996821257.png


However, even with the error, my staging table is still receiving the records.

Can someone help me please?

 

Thank you

André Ramos

9 REPLIES 9

Hi @Andr_1 

 

May be the default timeout of 30 seconds is creating the issue. To bypass it, we need to set the system property "glide.http.outbound.max_timeout.enabled" to false and make the REST API call using scripting. In the script, we need to use waitForResponse(). Please refer below links and check if this helps.

 

https://developer.servicenow.com/dev.do#!/reference/api/utah/server/sn_ws-namespace/c_RESTResponseV2...

https://www.servicenow.com/community/developer-forum/connect-timed-out-in-rest-step-flow-designer/m-...

 

Thanks & Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

Hello @Amit Verma 

I am doing the call to the api with SOAP Steps on the flow design.

But, to try your suggestion, I created an script to do a rest message

Andr_1_0-1705311561668.png

I set the "glide.http.outbound.max_timeout.enabled"  to false and used the waitForResponse() in the script. I put also a log to see the response body, and it gives me an error:

Andr_1_2-1705311722466.png

 

"An internal error occurred. For error details check MPL ID AGWhciSbtst0D7H1VnYS2Dp9L4Tg in message monitoring or use the URL ..... to directly access the error information"

Hi @Andr_1 

 

Are you calling a SOAP endpoint in the "ServiceNow CPI test" Rest message ? Most probably, you are getting this error from the endpoint not from ServiceNow.

 

Thanks & Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

Hey @Andr_1,

I'm facing the same issue. Did you manage to fix it?

Best,
JG

Andr_1
Tera Contributor

Hello @Kub 

I did not... I simply change the approach and right now I am not using flow design anymore. I am calling the api via script, and inside the script I am including the code to run on asynchronous mode