summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-05-01 18:41:37 -0300
committerRobin Appelman <robin@icewind.nl>2017-05-02 13:43:48 +0200
commit23cc309606443003c3478d96452998b109ea9c09 (patch)
treeaa2459d4c6abda0415dcb623e9716fdf9ef8e279 /apps/files_sharing
parent6aac094091076d503d6376ca74d2bedadff63de7 (diff)
downloadnextcloud-server-23cc309606443003c3478d96452998b109ea9c09.tar.gz
nextcloud-server-23cc309606443003c3478d96452998b109ea9c09.zip
Handle more error cases
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/lib/Controller/PublicPreviewController.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Controller/PublicPreviewController.php b/apps/files_sharing/lib/Controller/PublicPreviewController.php
index b91b84c9c34..49e48993f5c 100644
--- a/apps/files_sharing/lib/Controller/PublicPreviewController.php
+++ b/apps/files_sharing/lib/Controller/PublicPreviewController.php
@@ -97,6 +97,8 @@ class PublicPreviewController 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);
}
}
}