Catch all errors thrown by "fetchRaw"

This commit is contained in:
Michael 2023-02-26 14:08:33 +00:00
parent 6870ccc00e
commit 2b513a48c7
8 changed files with 64 additions and 28 deletions

View file

@ -570,7 +570,12 @@ class Processor
*/
public static function isActivityGone(string $url): bool
{
$curlResult = HTTPSignature::fetchRaw($url, 0);
try {
$curlResult = HTTPSignature::fetchRaw($url, 0);
} catch (\Throwable $th) {
Logger::notice('Error fetching url', ['url' => $url, 'error' => $th]);
return true;
}
if (Network::isUrlBlocked($url)) {
return true;