mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-03-27 01:25:05 +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:
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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user