From: Art4 Date: Fri, 7 Mar 2025 10:50:15 +0000 (+0000) Subject: Change 500 response to 422 response X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=eb37bcaa74903edb72665b69ef02a6d0beba66d1;p=friendica.git Change 500 response to 422 response see https://github.com/friendica/friendica/pull/14475 --- diff --git a/src/Module/Api/Mastodon/Media.php b/src/Module/Api/Mastodon/Media.php index df6c521008..31ab33c527 100644 --- a/src/Module/Api/Mastodon/Media.php +++ b/src/Module/Api/Mastodon/Media.php @@ -46,7 +46,7 @@ class Media extends BaseApi $media = Photo::upload($uid, $request['file'], '', null, null, '', '', $request['description']); if (empty($media)) { - $this->logAndJsonError(500, $this->errorFactory->InternalError('Error while uploading media.')); + $this->logAndJsonError(422, $this->errorFactory->UnprocessableEntity('Error while uploading media.')); } $this->logger->info('Uploaded photo', ['media' => $media]);