mirror of https://github.com/sbt/sbt.git
Recovering futures in case of error in web app
Fixes https://github.com/alexarchambault/coursier/issues/3
This commit is contained in:
parent
08349d129a
commit
754ffcbd38
|
|
@ -100,7 +100,7 @@ case class Remote(base: String, logger: Option[Logger] = None) extends Repositor
|
|||
|
||||
EitherT(Task{ implicit ec =>
|
||||
logger.foreach(_.fetching(url))
|
||||
Remote.get(url).map{ eitherXml =>
|
||||
Remote.get(url).recover{case e: Exception => Left(e.getMessage)}.map{ eitherXml =>
|
||||
logger.foreach(_.fetched(url))
|
||||
for {
|
||||
xml <- \/.fromEither(eitherXml)
|
||||
|
|
|
|||
Loading…
Reference in New Issue