Timeout (I think) when using a 'while' loop with 'wait' steps and conditions

Hi all,

I’m using the OpenAI Assistant API. The way the API works is you have to make GET requests to check on the status, and then once it’s confirmed as ‘completed’ you can retrieve the content.

As the response times vary I’m trying to use a While loop, that ends once the status changes from ‘in_progess’ to ‘completed’.

If I have say, a 200 ms wait, and condition and say 5 max iterations then the API will be a success, but, I won’t get the content from OpenAI as it hasn’t finished.

If I try and change things like iterations, or ms wait time (e.g. up to 5,000 or 10,000) then I just get a 404 error in the network tab and this error:

{“status”:“500”,“message”:“fs.exists: path is required.”,“stack”:“Error: fs.exists: path is required.\n at App.parseRequired (/opt/node_app/lib/core/app.js:637:19)\n at App.exports.getValue (/opt/node_app/extensions/server_connect/modules/pdftotext.js:7:34)\n at App._exec (/opt/node_app/lib/core/app.js:611:57)\n at App._exec (/opt/node_app/lib/core/app.js:578:28)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at async App.exec (/opt/node_app/lib/core/app.js:547:9)\n at async App.define (/opt/node_app/lib/core/app.js:529:9)”}

ChatGPT tells me this is to do with the fs module which I believe is the ‘condition’ feature. However, the condition works fine in any other scenario, and with small ms wait times and iterations.

Note that this also fails if I do a inline condition flow, with a wait step after each.

Any ideas what might be up here?

I can confirm I have the while loop configured correctly so that it does not just get stuck in a loop and crashes.