summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2020-06-16 21:24:10 +0200
committerGitHub <noreply@github.com>2020-06-16 21:24:10 +0200
commit4cff3a3a86b726f1863da9196d8a7cb2a425785f (patch)
treec326d780722cd7b7ba330dd0a796b85d2f24a569
parent5e52c110bb149f35ec46472a4834a5f9a25c4892 (diff)
parent94a95ffceb0ec16b333d13a0742a5e0c2c1ed93e (diff)
downloadnextcloud-server-4cff3a3a86b726f1863da9196d8a7cb2a425785f.tar.gz
nextcloud-server-4cff3a3a86b726f1863da9196d8a7cb2a425785f.zip
Merge pull request #21432 from nextcloud/fix/exception-getresult
Fix invalid usage of \Exception::getResult
-rw-r--r--ocs/v1.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/ocs/v1.php b/ocs/v1.php
index 983bfd5f77d..0c24aa814eb 100644
--- a/ocs/v1.php
+++ b/ocs/v1.php
@@ -67,9 +67,15 @@ try {
OC_API::setContentType();
http_response_code(405);
exit();
-} catch (Exception $ex) {
+} catch (\OC\OCS\Exception $ex) {
OC_API::respond($ex->getResult(), OC_API::requestedFormat());
exit();
+} catch (Throwable $ex) {
+ OC::$server->getLogger()->logException($ex);
+
+ OC_API::setContentType();
+ http_response_code(500);
+ exit();
}
/*