summaryrefslogtreecommitdiff
path: root/actions/apimediaupload.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/apimediaupload.php')
-rw-r--r--actions/apimediaupload.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/actions/apimediaupload.php b/actions/apimediaupload.php
index ec316edc8..7aa88c186 100644
--- a/actions/apimediaupload.php
+++ b/actions/apimediaupload.php
@@ -88,15 +88,15 @@ class ApiMediaUploadAction extends ApiAuthAction
try {
$upload = MediaFile::fromUpload('media', $this->auth_user);
- } catch (ClientException $ce) {
- $this->clientError($ce->getMessage());
+ } catch (Exception $e) {
+ $this->clientError($e->getMessage(), $e->getCode());
return;
}
if (isset($upload)) {
$this->showResponse($upload);
} else {
- $this->clientError('Upload failed.');
+ $this->clientError(_('Upload failed.'));
return;
}
}