mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-04-05 10:59:33 +00:00
Log error when setting folder doesn't work
This commit is contained in:
parent
d06d541d0a
commit
1c0d87527b
@ -12,6 +12,7 @@ import cats.implicits._
|
||||
import docspell.backend.ops.OItem
|
||||
import docspell.common._
|
||||
import docspell.joex.scheduler.Task
|
||||
import docspell.store.UpdateResult
|
||||
|
||||
object SetGivenData {
|
||||
type Args = ProcessItemArgs
|
||||
@ -46,7 +47,12 @@ object SetGivenData {
|
||||
e <- ops.setFolder(itemId, folderId, collective).attempt
|
||||
_ <- e.fold(
|
||||
ex => ctx.logger.warn(s"Error setting folder: ${ex.getMessage}"),
|
||||
_ => ().pure[F]
|
||||
res =>
|
||||
res match {
|
||||
case UpdateResult.Failure(ex) =>
|
||||
ctx.logger.warn(s"Error setting folder: ${ex.getMessage}")
|
||||
case _ => ().pure[F]
|
||||
}
|
||||
)
|
||||
} yield data
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user