diff options
author | Florian Pritz <bluewind@xinu.at> | 2020-04-19 13:47:34 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2020-04-19 13:55:45 +0200 |
commit | ac934ca94370f5204319f88eef0a7747fe7e133a (patch) | |
tree | aadc36591663cb706f4b208491b3ceed5e6abc55 /application/controllers/api/v2/file.php | |
parent | ddf6734dfeac65babf096a3147338f54d712b6e3 (diff) |
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 <bluewind@xinu.at>
Diffstat (limited to 'application/controllers/api/v2/file.php')
-rw-r--r-- | application/controllers/api/v2/file.php | 2 |
1 files changed, 1 insertions, 1 deletions
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); |