diff options
author | Julius Knorr <jus@bitgrid.net> | 2025-01-17 15:10:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-17 15:10:43 +0100 |
commit | 6afe12593ea9339ea396c2710eda128fe79ca15c (patch) | |
tree | 38503891cb99792d6528f0c7677f697d9f31a374 /apps/files/lib/Controller/ConversionApiController.php | |
parent | 326120a7f7713c43084f1eed5f2a1ab1ffd29004 (diff) | |
parent | fc9af3479976c9fa9ac5059233aa799b2ef18bd7 (diff) | |
download | nextcloud-server-6afe12593ea9339ea396c2710eda128fe79ca15c.tar.gz nextcloud-server-6afe12593ea9339ea396c2710eda128fe79ca15c.zip |
Merge pull request #50227 from nextcloud/fix/convert-log
fix: Log exceptions that happen during file conversion
Diffstat (limited to 'apps/files/lib/Controller/ConversionApiController.php')
-rw-r--r-- | apps/files/lib/Controller/ConversionApiController.php | 4 |
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); |