Merge pull request #21432 from nextcloud/fix/exception-getresult

Fix invalid usage of \Exception::getResult
This commit is contained in:
Joas Schilling 2020-06-16 21:24:10 +02:00 committed by GitHub
commit 4cff3a3a86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();
}
/*