diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2015-01-19 17:05:43 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2015-01-23 10:11:14 +0100 |
commit | 7e6d2c73d22f919229bd955b2fd6a9aa2973791e (patch) | |
tree | a6b7e7f88e0122052f731b6781bf3a817fb35221 /apps/files/controller | |
parent | bc93a8f14094dfb59c826ffa76d7b046370b0410 (diff) | |
download | nextcloud-server-7e6d2c73d22f919229bd955b2fd6a9aa2973791e.tar.gz nextcloud-server-7e6d2c73d22f919229bd955b2fd6a9aa2973791e.zip |
Ignore favorites that are not available when creating the favorites list
Also correctly return the exception for all cases when adding/removing favos
Diffstat (limited to 'apps/files/controller')
-rw-r--r-- | apps/files/controller/apicontroller.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/files/controller/apicontroller.php b/apps/files/controller/apicontroller.php index 902731a0492..a8bea27e4bb 100644 --- a/apps/files/controller/apicontroller.php +++ b/apps/files/controller/apicontroller.php @@ -67,6 +67,7 @@ class ApiController extends Controller { * * @param string $path path * @param array $tags array of tags + * @return DataResponse */ public function updateFileTags($path, $tags = null) { $result = array(); @@ -76,6 +77,10 @@ class ApiController extends Controller { $this->tagService->updateFileTags($path, $tags); } catch (\OCP\Files\NotFoundException $e) { return new DataResponse($e->getMessage(), Http::STATUS_NOT_FOUND); + } catch (\OCP\Files\StorageNotAvailableException $e) { + return new DataResponse($e->getMessage(), Http::STATUS_SERVICE_UNAVAILABLE); + } catch (\Exception $e) { + return new DataResponse($e->getMessage(), Http::STATUS_NOT_FOUND); } $result['tags'] = $tags; } @@ -89,6 +94,7 @@ class ApiController extends Controller { * @CORS * * @param array $tagName tag name to filter by + * @return DataResponse */ public function getFilesByTag($tagName) { $files = array(); |