Move jsonError out of Factory\Api\Mastodon\Error->UnprocessableEntity

This commit is contained in:
Hypolite Petovan 2023-10-11 09:20:49 -04:00
parent 7f846f153d
commit 7486ebdc10
52 changed files with 76 additions and 73 deletions

View file

@ -70,7 +70,7 @@ class Apps extends BaseApi
}
if (empty($request['client_name']) || empty($request['redirect_uris'])) {
DI::mstdnError()->UnprocessableEntity(DI::l10n()->t('Missing parameters'));
$this->logErrorAndJsonExit(422, $this->errorFactory->UnprocessableEntity($this->t('Missing parameters')));
}
$client_id = bin2hex(random_bytes(32));