function shouldRetry(attempt: number): boolean {
      return (
        ExecutionEnvironment.canUseDOM &&
        attempt <= _retryDelays.length
      );
    }
Checks if another attempt should be done to send a request to the server.