Skip to content

Commit

Permalink
Merge pull request #26128 from nextcloud/backport/26115/stable21
Browse files Browse the repository at this point in the history
[stable21] Log exceptions when creating share
  • Loading branch information
ChristophWurst authored Mar 16, 2021
2 parents 8d6a4be + f109677 commit e09d59a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/files_sharing/lib/Controller/ShareAPIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -631,9 +631,11 @@ public function createShare(
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);
}

Expand Down

0 comments on commit e09d59a

Please sign in to comment.