diff options
Diffstat (limited to 'lib/Controller/ActivityPubController.php')
-rw-r--r-- | lib/Controller/ActivityPubController.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Controller/ActivityPubController.php b/lib/Controller/ActivityPubController.php index ac4b4d28..2714eb21 100644 --- a/lib/Controller/ActivityPubController.php +++ b/lib/Controller/ActivityPubController.php @@ -358,8 +358,8 @@ class ActivityPubController extends Controller { * * @return Response * @throws SocialAppConfigException - * @throws StreamNotFoundException * @throws UrlCloudException + * @throws StreamNotFoundException */ public function displayPost(string $username, string $token): Response { try { @@ -378,7 +378,11 @@ class ActivityPubController extends Controller { } $postId = $this->configService->getSocialUrl() . '@' . $username . '/' . $token; - $stream = $this->streamService->getStreamById($postId, true); + try { + $stream = $this->streamService->getStreamById($postId, true); + } catch (StreamNotFoundException $e) { + return $this->fail($e, ['stream' => $postId], Http::STATUS_NOT_FOUND); + } $stream->setCompleteDetails(false); |