@ -27,6 +27,12 @@ try {
OC::handleRequest();
} catch(\OC\ServiceUnavailableException $ex) {
\OCP\Util::logException('index', $ex);
//show the user a detailed error page
OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
OC_Template::printExceptionErrorPage($ex);
} catch (Exception $ex) {
@ -45,6 +45,11 @@ try {
require_once OC_App::getAppPath($app) . '/' . $parts[1];
} catch (\OC\ServiceUnavailableException $ex) {
\OCP\Util::writeLog('remote', $ex->getMessage(), \OCP\Util::FATAL);
OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
@ -51,6 +51,10 @@ try {
$baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/';
require_once $file;