title: What's the difference between onComplete and flatMap of Future?
body: <p>I'm writing a Scala application using ReactiveMongo driver. The methods that access to the db return always <code>Future[T]</code>. Are the following pieces of code equivalent?</p>
  
  <p>(With <code>onComplete</code>)</p>
  
  <pre><code>val results: Future[List[Tag]] = Tags.all.toList
  results onComplete {
      case Success(list) =&gt; //do something with list
      case Failure(t) =&gt; //throw the error
  }
  </code></pre>
  
  <p>(With <code>flatMap</code>)</p>
  
  <pre><code>Tags.all.toList.flatMap(list =&gt; //do something with list)
  </code></pre>
  
  <p>What's the difference?</p>
  
  <p>The flatMap doesn't throw the Failure?? And the <code>flatMap</code> is a callback like <code>onComplete</code> or wait until the <code>Tags.all.toList</code> statement doesn't complete?</p>