X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapimediaupload.php;h=7aa88c186bcc58c3592393e6d90bda8f7596feaf;hb=f7d69c38af60fbc984743d20340bd0fd02fd6d77;hp=ec316edc8d78b1c50d5573db9a10bad8ac9707d0;hpb=1de7badd78bb3cddc99a6960ec6a395a191ce6be;p=quix0rs-gnu-social.git diff --git a/actions/apimediaupload.php b/actions/apimediaupload.php index ec316edc8d..7aa88c186b 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; } }