aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/TaskProcessing/Manager.php
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2024-07-13 11:42:06 +0200
committerMarcel Klehr <mklehr@gmx.net>2024-07-17 13:55:55 +0200
commitfb34b13439fb9751a2929edff5be6aabf430f181 (patch)
tree530f26b600c030ec5b837779b7458be1e425d0f9 /lib/private/TaskProcessing/Manager.php
parent2fed2fc433350cc7633a5c5ffeac149c450483b7 (diff)
downloadnextcloud-server-fb34b13439fb9751a2929edff5be6aabf430f181.tar.gz
nextcloud-server-fb34b13439fb9751a2929edff5be6aabf430f181.zip
fix(TaskProcessingA/Manager): Catch new error
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'lib/private/TaskProcessing/Manager.php')
-rw-r--r--lib/private/TaskProcessing/Manager.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/TaskProcessing/Manager.php b/lib/private/TaskProcessing/Manager.php
index 5d4c4497afd..421bf39de07 100644
--- a/lib/private/TaskProcessing/Manager.php
+++ b/lib/private/TaskProcessing/Manager.php
@@ -22,6 +22,7 @@ use OCP\Files\Config\IUserMountCache;
use OCP\Files\File;
use OCP\Files\GenericFileException;
use OCP\Files\IAppData;
+use OCP\Files\InvalidPathException;
use OCP\Files\IRootFolder;
use OCP\Files\Node;
use OCP\Files\NotPermittedException;
@@ -713,7 +714,12 @@ class Manager implements IManager {
$error = 'The task was processed successfully but storing the output in a file failed';
$task->setErrorMessage($error);
$this->logger->error($error, ['exception' => $e]);
-
+ } catch (InvalidPathException|\OCP\Files\NotFoundException $e) {
+ $task->setProgress(1);
+ $task->setStatus(Task::STATUS_FAILED);
+ $error = 'The task was processed successfully but the result file could not be found';
+ $task->setErrorMessage($error);
+ $this->logger->error($error, ['exception' => $e]);
}
}
$taskEntity = \OC\TaskProcessing\Db\Task::fromPublicTask($task);