summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2017-05-02 21:49:14 +0200
committerGitHub <noreply@github.com>2017-05-02 21:49:14 +0200
commit24ff230f938bb9c47bbd75a133af84314b42aca7 (patch)
tree6919c65502964fea435abe070d0e544dae6e38dd /apps/files_sharing
parent34b8ea6ebf0cbe873804e1fb8d7d87859d3bb8e9 (diff)
parent2847e9f2e3e5f338ba1b727ea207b2c549d38e92 (diff)
downloadnextcloud-server-24ff230f938bb9c47bbd75a133af84314b42aca7.tar.gz
nextcloud-server-24ff230f938bb9c47bbd75a133af84314b42aca7.zip
Merge pull request #4620 from nextcloud/preview-error-handling
better handling of preview generation errors
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);
}
}
}