From ac934ca94370f5204319f88eef0a7747fe7e133a Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 19 Apr 2020 13:47:34 +0200 Subject: Reclassify various exceptions as UserInputException These are errors that a user can correct themselves so we should classify them accordingly. That way they get the correct HTTP status code and they also get ignored by the logging code. Signed-off-by: Florian Pritz --- application/controllers/api/v2/file.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application/controllers/api') diff --git a/application/controllers/api/v2/file.php b/application/controllers/api/v2/file.php index 3d4103f1c..6da0d8155 100644 --- a/application/controllers/api/v2/file.php +++ b/application/controllers/api/v2/file.php @@ -24,7 +24,7 @@ class file extends \controllers\api\api_controller { $files = getNormalizedFILES(); if (empty($files)) { - throw new \exceptions\PublicApiException("file/no-file", "No file was uploaded or unknown error occurred."); + throw new \exceptions\UserInputException("file/no-file", "No file was uploaded or unknown error occurred."); } \service\files::verify_uploaded_files($files); -- cgit v1.2.3-24-g4f1b