summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2023-09-07 13:03:38 +0200
committerMarcel Klehr <mklehr@gmx.net>2023-10-18 13:21:50 +0200
commit2d44c7c1ed4487b946a72eb9d32da59d799d8c66 (patch)
tree41a45740b8b7f48751ae546ba7901bdc3c4af929 /core
parentc8cab9d2fd347975d3d5b4e1d7d9b549e5db6e25 (diff)
downloadnextcloud-server-2d44c7c1ed4487b946a72eb9d32da59d799d8c66.tar.gz
nextcloud-server-2d44c7c1ed4487b946a72eb9d32da59d799d8c66.zip
Small fixes
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'core')
-rw-r--r--core/Controller/TextToImageApiController.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/core/Controller/TextToImageApiController.php b/core/Controller/TextToImageApiController.php
index 4d2f6c81c90..93dab0a5d49 100644
--- a/core/Controller/TextToImageApiController.php
+++ b/core/Controller/TextToImageApiController.php
@@ -77,10 +77,9 @@ class TextToImageApiController extends \OCP\AppFramework\OCSController {
* @param string $appId ID of the app that will execute the task
* @param string $identifier An arbitrary identifier for the task
*
- * @return DataResponse<Http::STATUS_OK, array{task: CoreTextToImageTask}, array{}>|DataResponse<Http::STATUS_BAD_REQUEST|Http::STATUS_PRECONDITION_FAILED, array{message: string}, array{}>
+ * @return DataResponse<Http::STATUS_OK, array{task: CoreTextToImageTask}, array{}>|DataResponse<Http::STATUS_PRECONDITION_FAILED, array{message: string}, array{}>
*
* 200: Task scheduled successfully
- * 400: Scheduling task is not possible
* 412: Scheduling task is not possible
*/
#[PublicPage]
@@ -122,9 +121,9 @@ class TextToImageApiController extends \OCP\AppFramework\OCSController {
return new DataResponse([
'task' => $json,
]);
- } catch (TaskNotFoundException $e) {
+ } catch (TaskNotFoundException) {
return new DataResponse(['message' => $this->l->t('Task not found')], Http::STATUS_NOT_FOUND);
- } catch (\RuntimeException $e) {
+ } catch (\RuntimeException) {
return new DataResponse(['message' => $this->l->t('Internal error')], Http::STATUS_INTERNAL_SERVER_ERROR);
}
}
@@ -184,9 +183,9 @@ class TextToImageApiController extends \OCP\AppFramework\OCSController {
return new DataResponse([
'task' => $json,
]);
- } catch (TaskNotFoundException $e) {
+ } catch (TaskNotFoundException) {
return new DataResponse(['message' => $this->l->t('Task not found')], Http::STATUS_NOT_FOUND);
- } catch (\RuntimeException $e) {
+ } catch (\RuntimeException) {
return new DataResponse(['message' => $this->l->t('Internal error')], Http::STATUS_INTERNAL_SERVER_ERROR);
}
}
@@ -214,7 +213,7 @@ class TextToImageApiController extends \OCP\AppFramework\OCSController {
return new DataResponse([
'tasks' => $json,
]);
- } catch (\RuntimeException $e) {
+ } catch (\RuntimeException) {
return new DataResponse(['message' => $this->l->t('Internal error')], Http::STATUS_INTERNAL_SERVER_ERROR);
}
}