Skip to content

Commit 052f096

Browse files
authored
Merge pull request #36115 from nextcloud/fix/catch-exception-in-provisioning_api
Catch Exceptions when loading storage data of users
2 parents dbfe7b1 + 1de26c8 commit 052f096

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

apps/provisioning_api/lib/Controller/AUserData.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,18 @@ protected function fillStorageInfo(string $userId): array {
268268
self::USER_FIELD_QUOTA => $quota !== false ? $quota : 'none',
269269
'used' => 0
270270
];
271+
} catch (\Exception $e) {
272+
\OC::$server->get(\Psr\Log\LoggerInterface::class)->error(
273+
"Could not load storage info for {user}",
274+
[
275+
'app' => 'provisioning_api',
276+
'user' => $userId,
277+
'exception' => $e,
278+
]
279+
);
280+
/* In case the Exception left things in a bad state */
281+
\OC_Util::tearDownFS();
282+
return [];
271283
}
272284
return $data;
273285
}

0 commit comments

Comments
 (0)