Retries a network operation run in a callback.
maximum attempts to try
callback that returns a promise of the network operation. If rejected with ConnectionError, it will be retried by calling the callback again.
the result of the network operation
ConnectionError If after maxAttempts the callback still throws ConnectionError
Retries a network operation run in a callback.