The whole loop crashes because of error in one of requests

Hy guys,
I have a pretty simple workflow loop block that addresses to API 100 times

One of the requests of the cycle returns an error and the whole workflow crashes

Despite I set to continue scenario with an error in the block settings

My desired behavior is to continue workflow even if an error has been received in one of the requests.

I mean I expect to get that block final results as something like

{data:[
{"result": "ok"},
{"result": "ok"},
{"result":"error"},
{"result": "ok"}]
}

and go ahead to the next block.

So my question is: how to handle with such errors?

The solution was pretty simple — just to add .catch(error => error)

2 Likes