return proper error code when reporting exception fails in remote.php
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
7d024bc337
commit
4dbcfa387a
|
@ -50,6 +50,7 @@ class RemoteException extends Exception {
|
|||
* @param Exception|Error $e
|
||||
*/
|
||||
function handleException($e) {
|
||||
try {
|
||||
$request = \OC::$server->getRequest();
|
||||
// in case the request content type is text/xml - we assume it's a WebDAV request
|
||||
$isXmlContentType = strpos($request->getHeader('Content-Type'), 'text/xml');
|
||||
|
@ -87,6 +88,9 @@ function handleException($e) {
|
|||
OC_Template::printExceptionErrorPage($e, $statusCode);
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
OC_Template::printExceptionErrorPage($e, 500);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue