Merge pull request #21441 from nextcloud/backport/21432/stable19
[stable19] Fix invalid usage of \Exception::getResult
This commit is contained in:
commit
a436df0bc9
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue