debug: log fileinfo on NotPermittedException

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2025-02-26 00:29:20 +01:00
parent 03ba092419
commit 96abf88e99
No known key found for this signature in database
GPG key ID: 7424F1874854DF23

View file

@ -55,6 +55,13 @@ class File extends Node implements \OCP\Files\File {
$this->fileInfo = null;
$this->sendHooks(['postWrite']);
} else {
$fileInfo = $this->getFileInfo(false);
$meta = [
'id' => $fileInfo?->getId(),
'data' => method_exists($fileInfo, 'getData') ? $fileInfo?->getData() : null,
'owner' => $fileInfo?->getOwner(),
];
\OCP\Log\logger('debug')->error('NotPermittedException details: {data}', ['data' => $meta]);
throw new NotPermittedException();
}
}