@@ -125,7 +125,7 @@ public function fetch(FeedInterface $feed) {
}
returnTRUE;
}
catch(RequestException$e){
catch(TransferException$e){
$this->logger->warning('The feed from %site seems to be broken because of error "%error".',['%site'=>$feed->label(),'%error'=>$e->getMessage()]);
$this->messenger->addWarning(t('The feed from %site seems to be broken because of error "%error".',['%site'=>$feed->label(),'%error'=>$e->getMessage()]));
Changes for core/modules/locale/locale.batch.inc: 6 added lines, 0 removed lines.
Original line number
Diff line number
Diff line
@@ -7,6 +7,7 @@
useDrupal\Core\File\FileSystemInterface;
useDrupal\Core\Url;
useGuzzleHttp\Exception\ConnectException;
useGuzzleHttp\Exception\RequestException;
usePsr\Http\Message\RequestInterface;
usePsr\Http\Message\ResponseInterface;
@@ -272,6 +273,11 @@ function locale_translation_http_check($uri) {
$logger->notice('HTTP request to @url failed with error: @error.',['@url'=>$uri,'@error'=>$response->getStatusCode().' '.$response->getReasonPhrase()]);
}
}
// We need to handle ConnectException separately because in Guzzle 7 it
// doesn't have a getResponse() method, so the above will fatal.
catch(ConnectException$e){
$logger->notice('HTTP request to @url failed with error: @error.',['@url'=>$uri,'@error'=>$e->getMessage()]);