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/
|
||||
|
@ -42,6 +43,10 @@ class Read extends BaseApi
|
|||
|
||||
DBA::update('mail', ['seen' => true], ['convid' => $this->parameters['id'], 'uid' => $uid]);
|
||||
|
||||
$this->jsonExit(DI::mstdnConversation()->createFromConvId($this->parameters['id'])->toArray());
|
||||
try {
|
||||
$this->jsonExit(DI::mstdnConversation()->createFromConvId($this->parameters['id'])->toArray());
|
||||
} catch (NotFoundException $e) {
|
||||
$this->logErrorAndJsonExit(404, $this->errorFactory->RecordNotFound());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue