fix(files_versions): Log failure to compute node path

To avoid hidden bugs, add some debug logging when a node path cannot be
 computed from a received event, to have more information for debugging

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2025-06-03 09:35:23 +02:00 committed by backportbot[bot]
parent fdb65eb500
commit 774928bcbe

View file

@ -443,6 +443,24 @@ class FileEventsListener implements IEventListener {
}
}
try {
$this->logger->debug('Failed to compute path for node', [
'node' => [
'path' => $node->getPath(),
'owner' => $owner,
'fileid' => $node->getId(),
'size' => $node->getSize(),
'mtime' => $node->getMTime(),
]
]);
} catch (NotFoundException) {
$this->logger->debug('Failed to compute path for node', [
'node' => [
'path' => $node->getPath(),
'owner' => $owner,
]
]);
}
return null;
}
}