Skip to content

Commit

Permalink
log warnings to give admins more infos about possibly miscalculated a…
Browse files Browse the repository at this point in the history
…ctivities.

Signed-off-by: Jan Messer <[email protected]>
  • Loading branch information
Messj1 committed Jul 23, 2024
1 parent a85d891 commit 327dcd0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/FilesHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -570,13 +570,17 @@ protected function getUserPathsFromPath($path, $uidOwner) {
try {
$node = $this->rootFolder->getUserFolder($uidOwner)->get($path);
} catch (NotFoundException $e) {
$this->logger->warning('Something fishy happens: Path "{path}" with owner "{uidOwner}" was not found',
['path'=> $path, 'uidOwner'=>$uidOwner]);
return [
'users' => [],
'remotes' => [],
];
}

if (!$node instanceof Node) {
$this->logger->warning('Something fishy happens: Path "{path}" of "{uidOwner}" is not a valid type.',
['path'=> $path, 'uidOwner'=>$uidOwner]);
return [
'users' => [],
'remotes' => [],
Expand Down

0 comments on commit 327dcd0

Please sign in to comment.