From 2aced4a60716a124476d0161555bc3f2e7459cbf 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 3fcb4c3294b5d..4c4d42f8d1525 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -213,7 +213,9 @@ public function put($data) { 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);