summaryrefslogtreecommitdiffstats
path: root/ocs/v1.php
diff options
context:
space:
mode:
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());
}