summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2017-11-29 16:03:23 +0100
committerGitHub <noreply@github.com>2017-11-29 16:03:23 +0100
commita9eb0d4a4084d9590cb954f385af0137ce399ca3 (patch)
tree7839f0d5646aa6f64ff4e878f56272851b6d8fe4 /apps
parentf03aa0480abe3c7c8bd207b7e08e750d18fdb2ba (diff)
parent79554a29e02120121c541206e427ce5dff52e693 (diff)
downloadnextcloud-server-a9eb0d4a4084d9590cb954f385af0137ce399ca3.tar.gz
nextcloud-server-a9eb0d4a4084d9590cb954f385af0137ce399ca3.zip
Merge pull request #7338 from nextcloud/fix_exception_on_unreachable_server
Do not log Exception if a connection error occured
Diffstat (limited to 'apps')
-rw-r--r--apps/federation/lib/BackgroundJob/GetSharedSecret.php3
-rw-r--r--apps/federation/lib/BackgroundJob/RequestSharedSecret.php3
2 files changed, 6 insertions, 0 deletions
diff --git a/apps/federation/lib/BackgroundJob/GetSharedSecret.php b/apps/federation/lib/BackgroundJob/GetSharedSecret.php
index a3b087e12f8..0c621aa40ea 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 0ba4e37f759..09de76cba95 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']);