From 95e358c382546302614f279dfae4e5199286d95d Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Mon, 8 May 2023 19:30:53 -0700 Subject: [PATCH] download: exceptions should be thrown Signed-off-by: Varun Patil --- lib/Controller/DownloadController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Controller/DownloadController.php b/lib/Controller/DownloadController.php index 70af137b..92465125 100644 --- a/lib/Controller/DownloadController.php +++ b/lib/Controller/DownloadController.php @@ -93,7 +93,7 @@ class DownloadController extends GenericApiController $session->remove($key); if (null === $info) { - return Exceptions::NotFound('handle'); + throw Exceptions::NotFound('handle'); } $name = $info[0].'-'.date('YmdHis'); @@ -104,7 +104,7 @@ class DownloadController extends GenericApiController // Check if we have any valid ids if (0 === \count($fileIds)) { - return Exceptions::NotFound('file IDs'); + throw Exceptions::NotFound('file IDs'); } // Download single file