mirror of
https://github.com/friendica/friendica
synced 2025-04-24 01:10:11 +00:00
Improved error messages
This commit is contained in:
parent
8a5560ec8f
commit
9125d296a1
17 changed files with 20 additions and 20 deletions
|
@ -39,12 +39,12 @@ class Authorize extends BaseApi
|
|||
$response_type = $_REQUEST['response_type'] ?? '';
|
||||
if ($response_type != 'code') {
|
||||
Logger::warning('Wrong or missing response type', ['response_type' => $response_type]);
|
||||
DI::mstdnError()->RecordNotFound();
|
||||
DI::mstdnError()->UnprocessableEntity();
|
||||
}
|
||||
|
||||
$application = self::getApplication();
|
||||
if (empty($application)) {
|
||||
DI::mstdnError()->RecordNotFound();
|
||||
DI::mstdnError()->UnprocessableEntity();
|
||||
}
|
||||
|
||||
$request = $_REQUEST;
|
||||
|
@ -68,7 +68,7 @@ class Authorize extends BaseApi
|
|||
|
||||
$token = self::createTokenForUser($application, $uid);
|
||||
if (!$token) {
|
||||
DI::mstdnError()->RecordNotFound();
|
||||
DI::mstdnError()->UnprocessableEntity();
|
||||
}
|
||||
|
||||
DI::app()->redirect($application['redirect_uri'] . '?code=' . $token['code']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue