Merge pull request #26130 from nextcloud/backport/26115/stable20
[stable20] Log exceptions when creating share
This commit is contained in:
commit
a6357ebcba
|
@ -616,9 +616,11 @@ class ShareAPIController extends OCSController {
|
||||||
try {
|
try {
|
||||||
$share = $this->shareManager->createShare($share);
|
$share = $this->shareManager->createShare($share);
|
||||||
} catch (GenericShareException $e) {
|
} catch (GenericShareException $e) {
|
||||||
|
\OC::$server->getLogger()->logException($e);
|
||||||
$code = $e->getCode() === 0 ? 403 : $e->getCode();
|
$code = $e->getCode() === 0 ? 403 : $e->getCode();
|
||||||
throw new OCSException($e->getHint(), $code);
|
throw new OCSException($e->getHint(), $code);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
\OC::$server->getLogger()->logException($e);
|
||||||
throw new OCSForbiddenException($e->getMessage(), $e);
|
throw new OCSForbiddenException($e->getMessage(), $e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue