summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-04-13 08:54:02 +0200
committerJoas Schilling <coding@schilljs.com>2023-04-13 09:02:38 +0200
commitb7c1e61d0be967beaaf68ec6deb2823cf79d0580 (patch)
treeff46ad050941067b0c887ba0523e3a943b1fb4d8 /core
parent21b056ee2d27be0f706584108797058ed316d3cc (diff)
downloadnextcloud-server-b7c1e61d0be967beaaf68ec6deb2823cf79d0580.tar.gz
nextcloud-server-b7c1e61d0be967beaaf68ec6deb2823cf79d0580.zip
fix(translation): Properly set the numbers as HTTP status code
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core')
-rw-r--r--core/Controller/TranslationApiController.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/Controller/TranslationApiController.php b/core/Controller/TranslationApiController.php
index 759740d6e90..b8ae1db9fef 100644
--- a/core/Controller/TranslationApiController.php
+++ b/core/Controller/TranslationApiController.php
@@ -72,9 +72,9 @@ class TranslationApiController extends \OCP\AppFramework\OCSController {
} catch (PreConditionNotMetException) {
return new DataResponse(['message' => $this->l->t('No translation provider available')], Http::STATUS_PRECONDITION_FAILED);
} catch (InvalidArgumentException) {
- return new DataResponse(['message' => $this->l->t('Could not detect language'), Http::STATUS_NOT_FOUND]);
+ return new DataResponse(['message' => $this->l->t('Could not detect language')], Http::STATUS_NOT_FOUND);
} catch (RuntimeException) {
- return new DataResponse(['message' => $this->l->t('Unable to translate'), Http::STATUS_INTERNAL_SERVER_ERROR]);
+ return new DataResponse(['message' => $this->l->t('Unable to translate')], Http::STATUS_INTERNAL_SERVER_ERROR);
}
}
}