Retrying autoLogin or Before

I’m having trouble logging in sometimes during the network issue and I’d like to retry that step until it is done at least once (later I use autoLogin’s restore() method to login for other Features/Scenarios).

Is there any way to retry in autoLogin plugin or Before() block?

I don’t think we have block retries now. Probably we should introduce such thing in new releases.
For now I recommend to wrap that in try/catch block in async function:

async () => {
  try {
    await this.login();
  } catch () {
    
    await this.login();
  }

Like so…