diff options
author | Josh <josh.t.richards@gmail.com> | 2025-01-16 10:35:36 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-16 10:35:36 -0500 |
commit | 3407a369aabf6cfdafeea100a3adc5565b5214c0 (patch) | |
tree | 4d59b33a5dc61f26eacec1814e69dfba255157ed | |
parent | 8998e77c9d35d1c6183ac5d47f8e1ee9cdefa77f (diff) | |
download | nextcloud-server-jtr/fix-sharing-update-hints.tar.gz nextcloud-server-jtr/fix-sharing-update-hints.zip |
fix(sharing): Show hint exception messagesjtr/fix-sharing-update-hints
Fixes #50075
Signed-off-by: Josh <josh.t.richards@gmail.com>
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareAPIController.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index f0b89ab5d47..adff2b31f12 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -1364,6 +1364,9 @@ class ShareAPIController extends OCSController { } catch (HintException $e) { $code = $e->getCode() === 0 ? 403 : $e->getCode(); throw new OCSException($e->getHint(), (int)$code); + } catch (\InvalidArgumentException $e) { + $this->logger->info($e->getMessage(), ['exception' => $e]); + throw new OCSBadRequestException($e->getMessage(), $e); } catch (\Exception $e) { $this->logger->error($e->getMessage(), ['exception' => $e]); throw new OCSBadRequestException('Failed to update share.', $e); |