summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-06-18 12:46:52 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-06-22 15:34:06 +0200
commit738b78f1b0eec61f4a55dd356d6b6a541ff56246 (patch)
treecba20da65582db0e389c2b7017c4ffd0a49ff7f5 /apps/files_sharing
parent2b7e5f841a016e8682d560643dce4797758a44c3 (diff)
downloadnextcloud-server-738b78f1b0eec61f4a55dd356d6b6a541ff56246.tar.gz
nextcloud-server-738b78f1b0eec61f4a55dd356d6b6a541ff56246.zip
Use \OC\HintException and translate the hint
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/api/local.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files_sharing/api/local.php b/apps/files_sharing/api/local.php
index 03812800c17..2d848f8b16e 100644
--- a/apps/files_sharing/api/local.php
+++ b/apps/files_sharing/api/local.php
@@ -27,6 +27,8 @@
namespace OCA\Files_Sharing\API;
+use OC\HintException;
+
class Local {
/**
@@ -294,6 +296,8 @@ class Local {
$shareWith,
$permissions
);
+ } catch (HintException $e) {
+ return new \OC_OCS_Result(null, 400, $e->getHint());
} catch (\Exception $e) {
return new \OC_OCS_Result(null, 403, $e->getMessage());
}