aboutsummaryrefslogtreecommitdiffstats
path: root/public.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-06-26 10:27:43 +0200
committerMorris Jobke <hey@morrisjobke.de>2018-06-26 11:44:24 +0200
commit1399f6bece1ff44c062acb21bf880c9d6eb8695e (patch)
treedafb9c77674fecdab62a85c43277f85186d1d35b /public.php
parent8c155cd51cb55c89f16d9bcfcb397d4e784ac108 (diff)
downloadnextcloud-server-1399f6bece1ff44c062acb21bf880c9d6eb8695e.tar.gz
nextcloud-server-1399f6bece1ff44c062acb21bf880c9d6eb8695e.zip
Server exception error pages by default with a 500 status code
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'public.php')
-rw-r--r--public.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/public.php b/public.php
index 42fd2e9f602..c81a6b5a960 100644
--- a/public.php
+++ b/public.php
@@ -79,16 +79,15 @@ try {
} catch (Exception $ex) {
if ($ex instanceof \OC\ServiceUnavailableException) {
- OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
+ $status = OC_Response::STATUS_SERVICE_UNAVAILABLE;
} else {
- OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
+ $status = OC_Response::STATUS_INTERNAL_SERVER_ERROR;
}
//show the user a detailed error page
\OC::$server->getLogger()->logException($ex, ['app' => 'public']);
- OC_Template::printExceptionErrorPage($ex);
+ OC_Template::printExceptionErrorPage($ex, $status);
} catch (Error $ex) {
//show the user a detailed error page
- OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
\OC::$server->getLogger()->logException($ex, ['app' => 'public']);
- OC_Template::printExceptionErrorPage($ex);
+ OC_Template::printExceptionErrorPage($ex, OC_Response::STATUS_INTERNAL_SERVER_ERROR);
}