Server error/hint pages with a 500 error code to avoid it being seen instead of the actual resource

* found while reviewing #7205
* allow to specify a special status code

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke
2018-06-26 09:17:37 +02:00
parent a97cc293b5
commit 8c155cd51c
6 changed files with 13 additions and 17 deletions
+1 -2
View File
@@ -77,8 +77,7 @@ function handleException($e) {
}
if ($e instanceof RemoteException) {
// we shall not log on RemoteException
OC_Response::setStatus($e->getCode());
OC_Template::printErrorPage($e->getMessage());
OC_Template::printErrorPage($e->getMessage(), '', $e->getCode());
} else {
\OC::$server->getLogger()->logException($e, ['app' => 'remote']);
OC_Response::setStatus($statusCode);