summaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing
diff options
context:
space:
mode:
authorSamuel <faust64@gmail.com>2021-02-05 11:55:56 +0100
committerSamuel <faust64@gmail.com>2021-02-05 11:55:56 +0100
commite41afea7396412b24077db615016ae55b6b4c404 (patch)
tree2fbeab3a0e36da056cc090e7ae4f603fff68a46a /apps/federatedfilesharing
parentdf9ce19a6b0db6bbe74c12b184ac798787344cfa (diff)
downloadnextcloud-server-e41afea7396412b24077db615016ae55b6b4c404.tar.gz
nextcloud-server-e41afea7396412b24077db615016ae55b6b4c404.zip
feat(federatedfilesharing): log errors, as suggested by @maxbes
Signed-off-by: Samuel <faust64@gmail.com>
Diffstat (limited to 'apps/federatedfilesharing')
-rw-r--r--apps/federatedfilesharing/lib/Notifications.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/apps/federatedfilesharing/lib/Notifications.php b/apps/federatedfilesharing/lib/Notifications.php
index 410c155b072..011842e7981 100644
--- a/apps/federatedfilesharing/lib/Notifications.php
+++ b/apps/federatedfilesharing/lib/Notifications.php
@@ -123,7 +123,15 @@ class Notifications {
$event = new FederatedShareAddedEvent($remote);
$this->eventDispatcher->dispatchTyped($event);
return true;
+ } else {
+ \OC::$server->getLogger()->info(
+ "failed sharing $name with $shareWith",
+ [ 'app' => 'federatedfilesharing' ]);
}
+ } else {
+ \OC::$server->getLogger()->info(
+ "could not share $name, invalid contact $shareWith",
+ [ 'app' => 'federatedfilesharing' ]);
}
return false;
@@ -174,6 +182,18 @@ class Notifications {
$status['ocs']['data']['token'],
$status['ocs']['data']['remoteId']
];
+ } else if (! $validToken) {
+ \OC::$server->getLogger()->info(
+ "invalid or missing token requesting re-share for $filename to $remote",
+ [ 'app' => 'federatedfilesharing' ]);
+ } else if (! $validRemoteId) {
+ \OC::$server->getLogger()->info(
+ "missing remote id requesting re-share for $filename to $remote",
+ [ 'app' => 'federatedfilesharing' ]);
+ } else {
+ \OC::$server->getLogger()->info(
+ "failed requesting re-share for $filename to $remote",
+ [ 'app' => 'federatedfilesharing' ]);
}
return false;