Breaking an iteration

Hi,

So, I have a default function, with couple of requests. I want to break the current iteration if one of the requests fails.

I used the following:

It does not work, it does not return and use a new iteration. The console log after the if condition does print out.

the console.log right after the fail is not working also!

Thanks in advance!

Surprised your having issues with this. I have thinks like this all over my tests and they end the curent iteration
Example
const token = getToken();
if (!token) return;