Skip to content
Snippets Groups Projects
Unverified Commit 4cff3a3a authored by Joas Schilling's avatar Joas Schilling Committed by GitHub
Browse files

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

Fix invalid usage of \Exception::getResult
parents 5e52c110 94a95ffc
No related branches found
No related tags found
No related merge requests found
...@@ -67,9 +67,15 @@ try { ...@@ -67,9 +67,15 @@ try {
OC_API::setContentType(); OC_API::setContentType();
http_response_code(405); http_response_code(405);
exit(); exit();
} catch (Exception $ex) { } catch (\OC\OCS\Exception $ex) {
OC_API::respond($ex->getResult(), OC_API::requestedFormat()); OC_API::respond($ex->getResult(), OC_API::requestedFormat());
exit(); exit();
} catch (Throwable $ex) {
OC::$server->getLogger()->logException($ex);
OC_API::setContentType();
http_response_code(500);
exit();
} }
/* /*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment