Merge pull request #38085 from nextcloud/chore/federation/address-book-sync-logging

fix(federation): Log address book sync exceptions
This commit is contained in:
Christoph Wurst 2023-05-05 03:18:48 +02:00 committed by GitHub
commit e127375dd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,10 +82,14 @@ class SyncFederationAddressBooks {
} catch (\Exception $ex) {
if ($ex->getCode() === Http::STATUS_UNAUTHORIZED) {
$this->dbHandler->setServerStatus($url, TrustedServers::STATUS_ACCESS_REVOKED);
$this->logger->error("Server sync for $url failed because of revoked access.");
$this->logger->error("Server sync for $url failed because of revoked access.", [
'exception' => $ex,
]);
} else {
$this->dbHandler->setServerStatus($url, TrustedServers::STATUS_FAILURE);
$this->logger->error("Server sync for $url failed.");
$this->logger->error("Server sync for $url failed.", [
'exception' => $ex,
]);
}
$callback($url, $ex);
}