mirror of
https://github.com/friendica/friendica
synced 2025-05-11 13:04:10 +02:00
Improved error messages
This commit is contained in:
parent
8a5560ec8f
commit
9125d296a1
17 changed files with 20 additions and 20 deletions
|
@ -41,7 +41,7 @@ class Followers extends BaseApi
|
|||
$uid = self::getCurrentUserID();
|
||||
|
||||
if (empty($parameters['id'])) {
|
||||
DI::mstdnError()->RecordNotFound();
|
||||
DI::mstdnError()->UnprocessableEntity();
|
||||
}
|
||||
|
||||
$id = $parameters['id'];
|
||||
|
|
|
@ -41,7 +41,7 @@ class Following extends BaseApi
|
|||
$uid = self::getCurrentUserID();
|
||||
|
||||
if (empty($parameters['id'])) {
|
||||
DI::mstdnError()->RecordNotFound();
|
||||
DI::mstdnError()->UnprocessableEntity();
|
||||
}
|
||||
|
||||
$id = $parameters['id'];
|
||||
|
|
|
@ -42,7 +42,7 @@ class Lists extends BaseApi
|
|||
$uid = self::getCurrentUserID();
|
||||
|
||||
if (empty($parameters['id'])) {
|
||||
DI::mstdnError()->RecordNotFound();
|
||||
DI::mstdnError()->UnprocessableEntity();
|
||||
}
|
||||
|
||||
$id = $parameters['id'];
|
||||
|
|
|
@ -43,7 +43,7 @@ class Statuses extends BaseApi
|
|||
public static function rawContent(array $parameters = [])
|
||||
{
|
||||
if (empty($parameters['id'])) {
|
||||
DI::mstdnError()->RecordNotFound();
|
||||
DI::mstdnError()->UnprocessableEntity();
|
||||
}
|
||||
|
||||
$id = $parameters['id'];
|
||||
|
|
|
@ -43,12 +43,12 @@ class VerifyCredentials extends BaseApi
|
|||
|
||||
$self = User::getOwnerDataById($uid);
|
||||
if (empty($self)) {
|
||||
DI::mstdnError()->RecordNotFound();
|
||||
DI::mstdnError()->InternalError();
|
||||
}
|
||||
|
||||
$cdata = Contact::getPublicAndUserContacID($self['id'], $uid);
|
||||
if (empty($cdata)) {
|
||||
DI::mstdnError()->RecordNotFound();
|
||||
DI::mstdnError()->InternalError();
|
||||
}
|
||||
|
||||
// @todo Support the source property,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue