aboutsummaryrefslogtreecommitdiffstats
path: root/core/Controller
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2023-11-06 12:50:16 +0100
committerMarcel Klehr <mklehr@gmx.net>2023-11-06 12:50:16 +0100
commitd11b9cbd7993042fcf9ba49d5c8ef14bf928d901 (patch)
tree4a62c0255c3a7efa90dae441afd6afbd1484020a /core/Controller
parent181f819e417a1818f37200f9071fa632c82a0fc2 (diff)
downloadnextcloud-server-d11b9cbd7993042fcf9ba49d5c8ef14bf928d901.tar.gz
nextcloud-server-d11b9cbd7993042fcf9ba49d5c8ef14bf928d901.zip
fix(TextProcessing/Manager): Throw TaskFailureException upon failure
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'core/Controller')
-rw-r--r--core/Controller/TextProcessingApiController.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/Controller/TextProcessingApiController.php b/core/Controller/TextProcessingApiController.php
index 6b975a7ed61..a6b85fd46ae 100644
--- a/core/Controller/TextProcessingApiController.php
+++ b/core/Controller/TextProcessingApiController.php
@@ -38,6 +38,7 @@ use OCP\Common\Exception\NotFoundException;
use OCP\DB\Exception;
use OCP\IL10N;
use OCP\IRequest;
+use OCP\TextProcessing\Exception\TaskFailureException;
use OCP\TextProcessing\ITaskType;
use OCP\TextProcessing\Task;
use OCP\TextProcessing\IManager;
@@ -121,7 +122,7 @@ class TextProcessingApiController extends \OCP\AppFramework\OCSController {
try {
try {
$this->textProcessingManager->runOrScheduleTask($task);
- } catch(\RuntimeException) {
+ } catch(TaskFailureException) {
// noop, because the task object has the failure status set already, we just return the task json
}