]> source.dussan.org Git - nextcloud-server.git/commitdiff
add logging of failed quota info 32076/head
authorRobin Appelman <robin@icewind.nl>
Fri, 22 Apr 2022 13:18:07 +0000 (15:18 +0200)
committerRobin Appelman <robin@icewind.nl>
Fri, 22 Apr 2022 13:29:30 +0000 (15:29 +0200)
Signed-off-by: Robin Appelman <robin@icewind.nl>
apps/dav/lib/Connector/Sabre/Directory.php

index 9e0b89596cdeeade50454e5069b04bd81c25e2c2..ed98b5050f811aa10083554e323a3845d6b2616a 100644 (file)
@@ -47,6 +47,7 @@ use OCP\Files\NotPermittedException;
 use OCP\Files\StorageNotAvailableException;
 use OCP\Lock\ILockingProvider;
 use OCP\Lock\LockedException;
+use Psr\Log\LoggerInterface;
 use Sabre\DAV\Exception\BadRequest;
 use Sabre\DAV\Exception\Locked;
 use Sabre\DAV\Exception\NotFound;
@@ -331,6 +332,8 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node implements \Sabre\DAV\ICol
         * @return array
         */
        public function getQuotaInfo() {
+               /** @var LoggerInterface $logger */
+               $logger = \OC::$server->get(LoggerInterface::class);
                if ($this->quotaInfo) {
                        return $this->quotaInfo;
                }
@@ -347,10 +350,13 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node implements \Sabre\DAV\ICol
                        ];
                        return $this->quotaInfo;
                } catch (\OCP\Files\NotFoundException $e) {
+                       $logger->warning("error while getting quota into", ['exception' => $e]);
                        return [0, 0];
                } catch (\OCP\Files\StorageNotAvailableException $e) {
+                       $logger->warning("error while getting quota into", ['exception' => $e]);
                        return [0, 0];
                } catch (NotPermittedException $e) {
+                       $logger->warning("error while getting quota into", ['exception' => $e]);
                        return [0, 0];
                }
        }