mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-21 09:58:26 +00:00
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: #387
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user