From 23cc309606443003c3478d96452998b109ea9c09 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Mon, 1 May 2017 18:41:37 -0300 Subject: Handle more error cases Signed-off-by: Morris Jobke --- core/Controller/PreviewController.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/Controller') diff --git a/core/Controller/PreviewController.php b/core/Controller/PreviewController.php index 4b9ba8b60d4..4e2b2f0287a 100644 --- a/core/Controller/PreviewController.php +++ b/core/Controller/PreviewController.php @@ -126,6 +126,8 @@ class PreviewController extends Controller { return $response; } catch (NotFoundException $e) { return new DataResponse([], Http::STATUS_NOT_FOUND); + } catch (\InvalidArgumentException $e) { + return new DataResponse([], Http::STATUS_BAD_REQUEST); } } -- cgit v1.2.3