def recoverWith()

in app/models/Attempt.scala [20:25]


  def recoverWith(f: AttemptErrors => Attempt[A])(implicit ec: ExecutionContext): Attempt[A] = Attempt {
    asFuture.flatMap {
      case Left(e) => f(e).asFuture
      case Right(a) => Future.successful(Right(a))
    }
  }