aboutsummaryrefslogtreecommitdiffstats
path: root/index.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 /index.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 'index.php')
-rw-r--r--index.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/index.php b/index.php
index 75511de12e1..b66281e6449 100644
--- a/index.php
+++ b/index.php
@@ -45,8 +45,7 @@ try {
\OC::$server->getLogger()->logException($ex, array('app' => 'index'));
//show the user a detailed error page
- OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
- OC_Template::printExceptionErrorPage($ex);
+ OC_Template::printExceptionErrorPage($ex, \OC_Response::STATUS_SERVICE_UNAVAILABLE);
} catch (\OC\HintException $ex) {
try {
OC_Template::printErrorPage($ex->getMessage(), $ex->getHint(), OC_Response::STATUS_SERVICE_UNAVAILABLE);
@@ -55,8 +54,7 @@ try {
\OC::$server->getLogger()->logException($ex2, array('app' => 'index'));
//show the user a detailed error page
- OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
- OC_Template::printExceptionErrorPage($ex);
+ OC_Template::printExceptionErrorPage($ex, \OC_Response::STATUS_INTERNAL_SERVER_ERROR);
}
} catch (\OC\User\LoginException $ex) {
OC_Template::printErrorPage($ex->getMessage(), $ex->getMessage(), OC_Response::STATUS_FORBIDDEN);
@@ -90,6 +88,5 @@ try {
throw $e;
}
- OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
- OC_Template::printExceptionErrorPage($ex);
+ OC_Template::printExceptionErrorPage($ex, \OC_Response::STATUS_INTERNAL_SERVER_ERROR);
}