diff --git a/apps/federation/lib/BackgroundJob/GetSharedSecret.php b/apps/federation/lib/BackgroundJob/GetSharedSecret.php index a3b087e12f..0c621aa40e 100644 --- a/apps/federation/lib/BackgroundJob/GetSharedSecret.php +++ b/apps/federation/lib/BackgroundJob/GetSharedSecret.php @@ -31,6 +31,7 @@ namespace OCA\Federation\BackgroundJob; use GuzzleHttp\Exception\ClientException; +use GuzzleHttp\Exception\ConnectException; use OC\BackgroundJob\JobList; use OC\BackgroundJob\Job; use OCA\Federation\DbHandler; @@ -196,6 +197,8 @@ class GetSharedSecret extends Job { } else { $this->logger->info($target . ' responded with a ' . $status . ' containing: ' . $e->getMessage(), ['app' => 'federation']); } + } catch (ConnectException $e) { + $this->logger->info('Could not connect to ' . $target, ['app' => 'federation']); } catch (\Exception $e) { $status = Http::STATUS_INTERNAL_SERVER_ERROR; $this->logger->logException($e, ['app' => 'federation']); diff --git a/apps/federation/lib/BackgroundJob/RequestSharedSecret.php b/apps/federation/lib/BackgroundJob/RequestSharedSecret.php index 0ba4e37f75..09de76cba9 100644 --- a/apps/federation/lib/BackgroundJob/RequestSharedSecret.php +++ b/apps/federation/lib/BackgroundJob/RequestSharedSecret.php @@ -32,6 +32,7 @@ namespace OCA\Federation\BackgroundJob; use GuzzleHttp\Exception\ClientException; +use GuzzleHttp\Exception\ConnectException; use OC\BackgroundJob\JobList; use OC\BackgroundJob\Job; use OCA\Federation\DbHandler; @@ -196,6 +197,8 @@ class RequestSharedSecret extends Job { } else { $this->logger->info($target . ' responded with a ' . $status . ' containing: ' . $e->getMessage(), ['app' => 'federation']); } + } catch (ConnectException $e) { + $this->logger->info('Could not connect to ' . $target, ['app' => 'federation']); } catch (\Exception $e) { $status = Http::STATUS_INTERNAL_SERVER_ERROR; $this->logger->logException($e, ['app' => 'federation']);