mirror of
https://github.com/friendica/friendica
synced 2025-04-27 12:30:11 +00:00
Merge pull request #12843 from annando/fetchraw-attachments
Catch all errors thrown by "fetchRaw"
This commit is contained in:
commit
a40ecb3902
22 changed files with 104 additions and 60 deletions
|
@ -64,7 +64,7 @@ class Notification extends BaseFactory
|
|||
if ($Notification->targetUriId) {
|
||||
try {
|
||||
$status = $this->mstdnStatusFactory->createFromUriId($Notification->targetUriId, $Notification->uid, $display_quotes);
|
||||
} catch (\Throwable $th) {
|
||||
} catch (\Exception $exception) {
|
||||
$status = null;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -269,8 +269,8 @@ class Status extends BaseFactory
|
|||
if ($is_reshare) {
|
||||
try {
|
||||
$reshare = $this->createFromUriId($uriId, $uid, $display_quote, false, false)->toArray();
|
||||
} catch (\Throwable $th) {
|
||||
Logger::info('Reshare not fetchable', ['uri-id' => $item['uri-id'], 'uid' => $uid, 'error' => $th]);
|
||||
} catch (\Exception $exception) {
|
||||
Logger::info('Reshare not fetchable', ['uri-id' => $item['uri-id'], 'uid' => $uid, 'exception' => $exception]);
|
||||
$reshare = [];
|
||||
}
|
||||
} else {
|
||||
|
@ -280,8 +280,8 @@ class Status extends BaseFactory
|
|||
if ($in_reply_status && ($item['gravity'] == Item::GRAVITY_COMMENT)) {
|
||||
try {
|
||||
$in_reply = $this->createFromUriId($item['thr-parent-id'], $uid, $display_quote, false, false)->toArray();
|
||||
} catch (\Throwable $th) {
|
||||
Logger::info('Reply post not fetchable', ['uri-id' => $item['uri-id'], 'uid' => $uid, 'error' => $th]);
|
||||
} catch (\Exception $exception) {
|
||||
Logger::info('Reply post not fetchable', ['uri-id' => $item['uri-id'], 'uid' => $uid, 'exception' => $exception]);
|
||||
$in_reply = [];
|
||||
}
|
||||
} else {
|
||||
|
@ -315,8 +315,8 @@ class Status extends BaseFactory
|
|||
if (!empty($quote_id)) {
|
||||
try {
|
||||
$quote = $this->createFromUriId($quote_id, $uid, false, false, false)->toArray();
|
||||
} catch (\Throwable $th) {
|
||||
Logger::info('Quote not fetchable', ['uri-id' => $item['uri-id'], 'uid' => $uid, 'error' => $th]);
|
||||
} catch (\Exception $exception) {
|
||||
Logger::info('Quote not fetchable', ['uri-id' => $item['uri-id'], 'uid' => $uid, 'exception' => $exception]);
|
||||
$quote = [];
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue