Skip to content

Commit cd6ff04

Browse files
committed
add logging of failed quota info
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent 8027f90 commit cd6ff04

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

apps/dav/lib/Connector/Sabre/Directory.php

+6
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
use OCP\Files\StorageNotAvailableException;
4848
use OCP\Lock\ILockingProvider;
4949
use OCP\Lock\LockedException;
50+
use Psr\Log\LoggerInterface;
5051
use Sabre\DAV\Exception\BadRequest;
5152
use Sabre\DAV\Exception\Locked;
5253
use Sabre\DAV\Exception\NotFound;
@@ -331,6 +332,8 @@ public function delete() {
331332
* @return array
332333
*/
333334
public function getQuotaInfo() {
335+
/** @var LoggerInterface $logger */
336+
$logger = \OC::$server->get(LoggerInterface::class);
334337
if ($this->quotaInfo) {
335338
return $this->quotaInfo;
336339
}
@@ -347,10 +350,13 @@ public function getQuotaInfo() {
347350
];
348351
return $this->quotaInfo;
349352
} catch (\OCP\Files\NotFoundException $e) {
353+
$logger->warning("error while getting quota into", ['exception' => $e]);
350354
return [0, 0];
351355
} catch (\OCP\Files\StorageNotAvailableException $e) {
356+
$logger->warning("error while getting quota into", ['exception' => $e]);
352357
return [0, 0];
353358
} catch (NotPermittedException $e) {
359+
$logger->warning("error while getting quota into", ['exception' => $e]);
354360
return [0, 0];
355361
}
356362
}

0 commit comments

Comments
 (0)