How to continue through a loop in Weweb if there's an error in the workflow

Hello! I’m setting up a workflow in WeWeb that requires loop iteration for each item in my database. Sometimes, this workflow may encounter failures. However, I want to ensure that the workflow continues until all the records in the database have been processed, rather than stopping when an issue arises. This is to avoid situations where, for instance, if the second record out of 50 encounters a problem, I’d have to restart everything from the beginning. Does anyone know how to accomplish this?

2 Likes

@stevedesignerd Did you figure this one out? I’m interested in this as well. My use case is autosaving user notes every 5 seconds or so. If my API call to save the notes in my DB fails, I’d like the loop to keep going rather than having the whole workflow stop.

What are the errors? Iteration should not generate any errors.

If the error is expected, it should be handled in the db and not raise an error in the workflow. If using Supabase, use a Postgres function, and have the errors handled inside the function.

You should not autosave notes to db without detecting a client side change. Save when the input is updated, and use debounce to make sure it doesn’t send updates that often to DB.