Retrying promises

Sometimes our promises will fail and we need a mechanism that we can try again before we give up.

Here is one way to do it.