aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorJulius Knorr <jus@bitgrid.net>2025-01-17 12:06:36 +0100
committerJulius Knorr <jus@bitgrid.net>2025-01-17 12:06:36 +0100
commitfc9af3479976c9fa9ac5059233aa799b2ef18bd7 (patch)
tree38503891cb99792d6528f0c7677f697d9f31a374 /apps/files
parent326120a7f7713c43084f1eed5f2a1ab1ffd29004 (diff)
downloadnextcloud-server-fc9af3479976c9fa9ac5059233aa799b2ef18bd7.tar.gz
nextcloud-server-fc9af3479976c9fa9ac5059233aa799b2ef18bd7.zip
fix: Log exceptions that happen during file conversionfix/convert-log
Signed-off-by: Julius Knorr <jus@bitgrid.net>
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/lib/Controller/ConversionApiController.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files/lib/Controller/ConversionApiController.php b/apps/files/lib/Controller/ConversionApiController.php
index 1a1b7da1787..40ea45451ad 100644
--- a/apps/files/lib/Controller/ConversionApiController.php
+++ b/apps/files/lib/Controller/ConversionApiController.php
@@ -24,6 +24,7 @@ use OCP\Files\File;
use OCP\Files\IRootFolder;
use OCP\IL10N;
use OCP\IRequest;
+use function OCP\Log\logger;
class ConversionApiController extends OCSController {
public function __construct(
@@ -80,7 +81,8 @@ class ConversionApiController extends OCSController {
try {
$convertedFile = $this->fileConversionManager->convert($file, $targetMimeType, $destination);
} catch (\Exception $e) {
- throw new OCSException($e->getMessage());
+ logger('files')->error($e->getMessage(), ['exception' => $e]);
+ throw new OCSException($this->l10n->t('The file could not be converted.'));
}
$convertedFileRelativePath = $userFolder->getRelativePath($convertedFile);