Skip to content

Handle Moat connection errors and other non-bootstrapping errors in TorConnect

Currently, we do not take into account that a Moat connection can fail during a bootstrap attempt. E.g. due to it being blocked by a firewall or if your connection is down.

In particular, if you start your first auto bootstrap in the ChooseRegion stage, but Moat has a connection error, then we take the user to the RegionNotFound or ConfirmRegion error stage, depending on whether the user chose the "automatic" region. But both are misleading to the user because the problem is that we could not connect to Moat, not that bootstrapping with the Moat bridges failed. So the choice of region is unrelated.

Without changing too much with how about:torconnect works, I think we could either:

  1. Jump to the FinalError stage.
  2. Have a separate MoatError stage, which is similar to ChooseRegion in function, but uses different wording that highlights the issue with connecting to Moat.

The first approach is much less effort to implement. The second approach would allow the user to retry the connection to Moat, but I'm not sure how likely a second attempt would be at succeeding or whether a user would be able to solve the underlying issue.

Other non-bootstrapping errors

On a related note, how should we handle other errors that are not BootstrapError? I feel like these are most likely implementation errors, and further auto bootstrap attempts probably won't help. We could skip to FinalError. Or we can revert back to the previous stage before the bootstrap started if we want the user to try again, but we don't want to progress them along our flow diagram.

/cc @pierov @morgan @donuts @felicia

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information