summaryrefslogtreecommitdiffstats
path: root/ocs/v1.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-08-03 18:06:07 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-08-03 18:06:07 +0200
commit3358db320b0c159df6012bd65243b0b970be4fae (patch)
tree182df2212ab621d9171b860cc2e7845670c73c13 /ocs/v1.php
parentbacf1603ffd53b7a5f73854d1d0ceb4ae545ce9f (diff)
downloadnextcloud-server-3358db320b0c159df6012bd65243b0b970be4fae.tar.gz
nextcloud-server-3358db320b0c159df6012bd65243b0b970be4fae.zip
Reduce duplicate code
Diffstat (limited to 'ocs/v1.php')
-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());
}