As Karl already answered, in your case there is no reason to use Future[Try[T]], though in some cases Future[Try[T]] might be useful.
Example:
when you need to do multiple requests but if some of them fails you still want to keep other results
Here when one request fails, you dont get any results:
val requests = dataList.map(requestToBackend)
//collect all results with sequence
val results = Future.sequence(requests)
Other solution is to recover with try and then collect only successful results
val requests = dataList.map{ data =>
requestToBackend(data)
.map(Success)
.recover { case x => Failure(x) }
}
//collect all results with sequence
val results = Future.sequence(requests).collect{ case Success(value) => value }
Future, you can use therecoverWithmethod to handle a possible error of a Future execution. ButFuture[Try[T]]make it more obvious for the caller to handle errors returning from the async execution. – Tomer Sela Feb 25 '18 at 22:45