mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-07 12:34:39 +02:00
Change 500 response to 422 response
see https://github.com/friendica/friendica/pull/14475
This commit is contained in:
parent
3975491887
commit
eb37bcaa74
1 changed files with 1 additions and 1 deletions
|
@ -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]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue