mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-09 16:44:26 +02:00
Move jsonError out of Factory\Api\Mastodon\Error->RecordNotFound
This commit is contained in:
parent
9e71610711
commit
7f846f153d
36 changed files with 68 additions and 56 deletions
|
@ -26,6 +26,7 @@ use Friendica\Database\DBA;
|
|||
use Friendica\DI;
|
||||
use Friendica\Module\BaseApi;
|
||||
use Friendica\Network\HTTPException;
|
||||
use Friendica\Network\HTTPException\NotFoundException;
|
||||
|
||||
/**
|
||||
* @see https://docs.joinmastodon.org/methods/timelines/
|
||||
|
@ -76,9 +77,13 @@ class Direct extends BaseApi
|
|||
|
||||
$statuses = [];
|
||||
|
||||
while ($mail = DBA::fetch($mails)) {
|
||||
self::setBoundaries($mail['uri-id']);
|
||||
$statuses[] = DI::mstdnStatus()->createFromMailId($mail['id']);
|
||||
try {
|
||||
while ($mail = DBA::fetch($mails)) {
|
||||
self::setBoundaries($mail['uri-id']);
|
||||
$statuses[] = DI::mstdnStatus()->createFromMailId($mail['id']);
|
||||
}
|
||||
} catch (NotFoundException $e) {
|
||||
$this->logErrorAndJsonExit(404, $this->errorFactory->RecordNotFound());
|
||||
}
|
||||
|
||||
if (!empty($request['min_id'])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue