summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorCôme Chilliet <91878298+come-nc@users.noreply.github.com>2023-01-16 11:40:51 +0100
committerGitHub <noreply@github.com>2023-01-16 11:40:51 +0100
commit052f09633b84cfb80e39b281e60c6dbffc3d3c36 (patch)
tree17e86e8c63006be78631c6d2dbb153abb171f893 /apps
parentdbfe7b1816ee4d7756478d3abbe336a2cf3dbe57 (diff)
parent1de26c84dd8e6e41c92df6a8fbcbdf30933ecc88 (diff)
downloadnextcloud-server-052f09633b84cfb80e39b281e60c6dbffc3d3c36.tar.gz
nextcloud-server-052f09633b84cfb80e39b281e60c6dbffc3d3c36.zip
Merge pull request #36115 from nextcloud/fix/catch-exception-in-provisioning_api
Catch Exceptions when loading storage data of users
Diffstat (limited to 'apps')
-rw-r--r--apps/provisioning_api/lib/Controller/AUserData.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/provisioning_api/lib/Controller/AUserData.php b/apps/provisioning_api/lib/Controller/AUserData.php
index 668b86c059a..909f3dcca74 100644
--- a/apps/provisioning_api/lib/Controller/AUserData.php
+++ b/apps/provisioning_api/lib/Controller/AUserData.php
@@ -268,6 +268,18 @@ abstract class AUserData extends OCSController {
self::USER_FIELD_QUOTA => $quota !== false ? $quota : 'none',
'used' => 0
];
+ } catch (\Exception $e) {
+ \OC::$server->get(\Psr\Log\LoggerInterface::class)->error(
+ "Could not load storage info for {user}",
+ [
+ 'app' => 'provisioning_api',
+ 'user' => $userId,
+ 'exception' => $e,
+ ]
+ );
+ /* In case the Exception left things in a bad state */
+ \OC_Util::tearDownFS();
+ return [];
}
return $data;
}