in src/main/scala/com/gu/flexible/snapshotter/model/Attempt.scala [71:79]
def fromEither[A](e: Either[AttemptErrors, A]): Attempt[A] =
Attempt(Future.successful(e))
/**
* Convert a plain `Future` value to an attempt by providing a recovery handler.
*/
def fromFuture[A](future: Future[Either[AttemptErrors, A]])(recovery: PartialFunction[Throwable, Either[AttemptErrors, A]])(implicit ec: ExecutionContext): Attempt[A] = {
Attempt(future recover recovery)
}