mirror of
https://github.com/friendica/friendica
synced 2025-04-27 13:50:12 +00:00
Catch all errors thrown by "fetchRaw"
This commit is contained in:
parent
6870ccc00e
commit
2b513a48c7
8 changed files with 64 additions and 28 deletions
|
@ -57,6 +57,7 @@ class ExternalResource implements ICanReadFromStorage
|
|||
try {
|
||||
$fetchResult = HTTPSignature::fetchRaw($data->url, $data->uid, [HttpClientOptions::ACCEPT_CONTENT => [HttpClientAccept::IMAGE]]);
|
||||
} catch (Exception $exception) {
|
||||
Logger::notice('URL is invalid', ['url' => $data->url, 'error' => $exception]);
|
||||
throw new ReferenceStorageException(sprintf('External resource failed to get %s', $reference), $exception->getCode(), $exception);
|
||||
}
|
||||
if (!empty($fetchResult) && $fetchResult->isSuccess()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue