kopia lustrzana https://github.com/nextcloud/social
details on fail
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>pull/952/head
rodzic
b91f94b32e
commit
7862780eaf
|
@ -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);
|
||||
|
||||
|
|
|
@ -254,9 +254,7 @@ class StreamRequest extends StreamRequestBuilder {
|
|||
} catch (ItemUnknownException $e) {
|
||||
throw new StreamNotFoundException('Malformed Stream');
|
||||
} catch (StreamNotFoundException $e) {
|
||||
throw new StreamNotFoundException(
|
||||
'Stream (ById) not found - ' . $id . ' (asViewer: ' . $asViewer . ')'
|
||||
);
|
||||
throw new StreamNotFoundException('Stream not found');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue