From b9b8db617636d400e7caf577f8bcbe2f17c9b391 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 27 May 2025 18:56:26 +0200 Subject: [PATCH] fix: log error when writing stream to dav file Signed-off-by: Robin Appelman --- apps/dav/lib/Connector/Sabre/File.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php index 98e0f2e9e4b..218d38e1c4b 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -216,7 +216,9 @@ class File extends Node implements IFile { try { /** @var IWriteStreamStorage $partStorage */ $count = $partStorage->writeStream($internalPartPath, $wrappedData); - } catch (GenericFileException) { + } catch (GenericFileException $e) { + $logger = Server::get(LoggerInterface::class); + $logger->error('Error while writing stream to storage: ' . $e->getMessage(), ['exception' => $e, 'app' => 'webdav']); $result = $isEOF; if (is_resource($wrappedData)) { $result = feof($wrappedData);