mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-11 17:44:27 +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
|
@ -25,6 +25,7 @@ use Friendica\Core\System;
|
|||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\BaseApi;
|
||||
use Friendica\Network\HTTPException\NotFoundException;
|
||||
|
||||
/**
|
||||
* @see https://docs.joinmastodon.org/methods/timelines/conversations/
|
||||
|
@ -83,9 +84,13 @@ class Conversations extends BaseApi
|
|||
|
||||
$conversations = [];
|
||||
|
||||
while ($conv = DBA::fetch($convs)) {
|
||||
self::setBoundaries($conv['id']);
|
||||
$conversations[] = DI::mstdnConversation()->createFromConvId($conv['id']);
|
||||
try {
|
||||
while ($conv = DBA::fetch($convs)) {
|
||||
self::setBoundaries($conv['id']);
|
||||
$conversations[] = DI::mstdnConversation()->createFromConvId($conv['id']);
|
||||
}
|
||||
} catch (NotFoundException $e) {
|
||||
$this->logErrorAndJsonExit(404, $this->errorFactory->RecordNotFound());
|
||||
}
|
||||
|
||||
DBA::close($convs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue