Merge pull request #26115 from nextcloud/enh/noid/log-share-exceptions
Log exceptions when creating share
This commit is contained in:
commit
2a55a892f0
|
@ -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 New Issue