Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add logging of failed quota info
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 committed Apr 22, 2022
commit 54ac585bc506105c9842991b5862a676ea7f23fc
6 changes: 6 additions & 0 deletions apps/dav/lib/Connector/Sabre/Directory.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
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;
Expand Down Expand Up @@ -331,6 +332,8 @@ public function delete() {
* @return array
*/
public function getQuotaInfo() {
/** @var LoggerInterface $logger */
$logger = \OC::$server->get(LoggerInterface::class);
if ($this->quotaInfo) {
return $this->quotaInfo;
}
Expand All @@ -347,10 +350,13 @@ public function getQuotaInfo() {
];
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];
}
}
Expand Down