mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(translation): Properly set the numbers as HTTP status code
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
21b056ee2d
commit
b7c1e61d0b
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue