Convert exceptions when converting to pdf into an error result

The file processing tries pdf conversion once and keeps going if it
fails. Some errors (e.g. timeouts) are raised via an exception.

Issue: 
This commit is contained in:
Eike Kettner 2020-10-26 19:48:29 +01:00
parent 0f84200118
commit dd89e05cc2

@ -58,6 +58,13 @@ private[extern] object ExternConv {
}
.compile
.lastOrError
.attempt
.flatMap {
case Right(v) =>
v.pure[F]
case Left(ex) =>
handler.run(ConversionResult.failure(ex))
}
def readResult[F[_]: Sync: ContextShift](
blocker: Blocker,