For Loops hangs if any iterations fail
Hi! Thank you for the great tool! I was testing the following flow:
- it fetches rss articles
- processes articles in a for loop
- fetches article content
- summarizes the article
- collects articles and summary in a single object from a for loop
The
fetches article content
step might fail sometime and in a script I don't have any error handling; my intuition was that the for loop should skip the failures and the resulting collection simply won't contain them (as I have skip failures
enabled in a for loop)
Instead of this I'm seeing the flow hanging and not proceeding because of the failures.
Should I add error handling to the script to avoid that or is there a better way to tell the for loop to ignore the failures?12 Replies
what do you mean by the for loop hangs?
also is it a parallel for loop?
hangsthe flow never completes, and it showing that it's currently executing the for loop it's a parallel (2 threads) for loop
do you have a minimal reproduction, i'm not following the issue
let me grab the code
if you can run that on app.windmill.dev and share the resulting run that'd be great
let me know if you can see it
https://app.windmill.dev/flows/get/u/stepan/benevolent_flow?workspace=demo
the problematic node is this one inside the foor loop
Here, JSDOM.fromURL can fail with network error and the for loop seems to wait something and do not stop
It's not hanging for me:

you have one particular url that makes it hang but that's user code specific:

anyway, not a windmill issue
one particular url that makes it hangyeah, this is what I meant the URL retreival fails with 403
execute that script with deno locally, it will hang too
it's up to you if you want to add code or windmill level timeout
but windmill is working as intended
execute that script with deno locally, it will hang toooh this makes perfect thanks, thank you. The script itself is hanging I thought the script finishes with error, but if it hangs, then yes, it's expected I guess for for loop to hang
code or windmill level timeoutthank you, I will look into that. Have a great day!