title: return type for findAndModify with futures
body: <p>Say I'm using an async library to read and write data. If a failure, I get an error message as a string, otherwise the data. Is there a better way to represent the return type than <code>Future[Either[String, Future[Data]]]</code>?</p>
  
  <p>Possible implementation:</p>
  
  <pre><code>  def createData(name: String): Future[Either[String, Future[Data]]] = {
      dataDAO.findOneByName(name).flatMap {
        case Some(data) =&gt;
          Future.successful(Left(s"Data with name already exists. $name"))
        case None =&gt;
          val data = Data.createFromName(name)
          dataDAO.save(data).map {
            lastError =&gt;
              data
          }.right.futureSuccessful
        }
      }
  </code></pre>