mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 09:13:19 -04:00
Merge pull request #26128 from nextcloud/backport/26115/stable21
[stable21] Log exceptions when creating share
This commit is contained in:
commit
e09d59aa81
1 changed files with 2 additions and 0 deletions
|
|
@ -631,9 +631,11 @@ class ShareAPIController extends OCSController {
|
|||
try {
|
||||
$share = $this->shareManager->createShare($share);
|
||||
} catch (GenericShareException $e) {
|
||||
\OC::$server->getLogger()->logException($e);
|
||||
$code = $e->getCode() === 0 ? 403 : $e->getCode();
|
||||
throw new OCSException($e->getHint(), $code);
|
||||
} catch (\Exception $e) {
|
||||
\OC::$server->getLogger()->logException($e);
|
||||
throw new OCSForbiddenException($e->getMessage(), $e);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue