@ -34,6 +34,7 @@ use OCP\Files\InvalidPathException;
use OCP\Files\IRootFolder;
use OCP\Files\Node;
use OCP\Files\NotFoundException;
use OCP\HintException;
use OCP\IConfig;
use OCP\IDateTimeZone;
use OCP\IGroupManager;
@ -46,7 +47,6 @@ use OCP\Lock\ILockingProvider;
use OCP\Lock\LockedException;
use OCP\Mail\IMailer;
use OCP\Server;
use OCP\Share\Exceptions\GenericShareException;
use OCP\Share\Exceptions\ShareNotFound;
use OCP\Share\IManager;
use OCP\Share\IProviderFactory;
@ -810,7 +810,7 @@ class ShareAPIController extends OCSController {
try {
$share = $this->shareManager->createShare($share);
} catch (GenericShare Exception $e) {
} catch (Hint Exception $e) {
$code = $e->getCode() === 0 ? 403 : $e->getCode();
throw new OCSException($e->getHint(), $code);
} catch (\Exception $e) {
@ -1351,7 +1351,7 @@ class ShareAPIController extends OCSController {
try {
$share = $this->shareManager->updateShare($share);
} catch (GenericShare Exception $e) {
} catch (Hint Exception $e) {
$code = $e->getCode() === 0 ? 403 : $e->getCode();
throw new OCSException($e->getHint(), (int)$code);
} catch (\Exception $e) {
@ -1439,7 +1439,7 @@ class ShareAPIController extends OCSController {
try {
$this->shareManager->acceptShare($share, $this->currentUser);
} catch (GenericShare Exception $e) {
} catch (Hint Exception $e) {
$code = $e->getCode() === 0 ? 403 : $e->getCode();
throw new OCSException($e->getHint(), (int)$code);
} catch (\Exception $e) {