$display_quotes = self::appSupportsQuotes();
foreach (array_slice($ancestors, 0, $request['limit']) as $ancestor) {
- $statuses['ancestors'][] = DI::mstdnStatus()->createFromUriId($ancestor, $uid, $display_quotes);
+ try {
+ $statuses['ancestors'][] = DI::mstdnStatus()->createFromUriId($ancestor, $uid, $display_quotes);
+ } catch (\Throwable $th) {
+ $this->logger->info('Post not fetchable', ['uri-id' => $ancestor, 'uid' => $uid, 'error' => $th]);
+ }
}
$descendants = array_diff(self::getChildren($id, $children), $deleted);
asort($descendants);
foreach (array_slice($descendants, 0, $request['limit']) as $descendant) {
- $statuses['descendants'][] = DI::mstdnStatus()->createFromUriId($descendant, $uid, $display_quotes);
+ try {
+ $statuses['descendants'][] = DI::mstdnStatus()->createFromUriId($descendant, $uid, $display_quotes);
+ } catch (\Throwable $th) {
+ $this->logger->info('Post not fetchable', ['uri-id' => $descendant, 'uid' => $uid, 'error' => $th]);
+ }
}
$this->jsonExit($statuses);