Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/ocs
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-08-03 19:06:07 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2015-08-03 19:06:07 +0300
commit3358db320b0c159df6012bd65243b0b970be4fae (patch)
tree182df2212ab621d9171b860cc2e7845670c73c13 /ocs
parentbacf1603ffd53b7a5f73854d1d0ceb4ae545ce9f (diff)
Reduce duplicate code
Diffstat (limited to 'ocs')
-rw-r--r--ocs/v1.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/ocs/v1.php b/ocs/v1.php
index 2829cf08c57..c5c18d20b8a 100644
--- a/ocs/v1.php
+++ b/ocs/v1.php
@@ -56,5 +56,7 @@ try {
} catch (MethodNotAllowedException $e) {
OC_API::setContentType();
OC_Response::setStatus(405);
+} catch (\OC\OCS\Exception $ex) {
+ OC_API::respond($ex->getResult(), OC_API::requestedFormat());
}