summaryrefslogtreecommitdiffstats
path: root/apps/files_versions/lib/Controller/PreviewController.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_versions/lib/Controller/PreviewController.php')
-rw-r--r--apps/files_versions/lib/Controller/PreviewController.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/files_versions/lib/Controller/PreviewController.php b/apps/files_versions/lib/Controller/PreviewController.php
index 8d961f47ee6..7a7c024fb52 100644
--- a/apps/files_versions/lib/Controller/PreviewController.php
+++ b/apps/files_versions/lib/Controller/PreviewController.php
@@ -94,6 +94,8 @@ class PreviewController extends Controller {
return new FileDisplayResponse($f, Http::STATUS_OK, ['Content-Type' => $f->getMimeType()]);
} catch (NotFoundException $e) {
return new DataResponse([], Http::STATUS_NOT_FOUND);
+ } catch (\InvalidArgumentException $e) {
+ return new DataResponse([], Http::STATUS_BAD_REQUEST);
}
}
}