summaryrefslogtreecommitdiffstats
path: root/application/controllers/api/v1/file.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/controllers/api/v1/file.php')
-rw-r--r--application/controllers/api/v1/file.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/application/controllers/api/v1/file.php b/application/controllers/api/v1/file.php
index 56455c01e..c291ae879 100644
--- a/application/controllers/api/v1/file.php
+++ b/application/controllers/api/v1/file.php
@@ -24,12 +24,12 @@ class file extends \controllers\api\api_controller {
$files = getNormalizedFILES();
if (empty($files)) {
- show_error("No file was uploaded or unknown error occured.");
+ throw new \exceptions\PublicApiException("file/no-file", "No file was uploaded or unknown error occured.");
}
$errors = \service\files::verify_uploaded_files($files);
if (!empty($errors)) {
- return send_json_error_reply("file/upload-verify-failed", "Failed to verify uploaded file", $errors);
+ throw new \exceptions\PublicApiException("file/upload-verify-failed", "Failed to verify uploaded file", $errors);
}
$limits = $this->muser->get_upload_id_limits();