We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94fa9aa commit a287169Copy full SHA for a287169
1 file changed
remote.php
@@ -58,13 +58,10 @@ function handleException(Exception|Error $e): void {
58
// we shall not log on RemoteException
59
\OCP\Server::get(ITemplateManager::class)->printErrorPage($e->getMessage(), '', $e->getCode());
60
} else {
61
- if ($e instanceof ServiceUnavailableException && $e->getCode() === 0) {
62
- $status = 503;
63
- }
64
if ($e->getCode() > 0) {
65
$status = $e->getCode();
66
67
- $status = 500;
+ $status = $e instanceof ServiceUnavailableException ? 503 : 500;
68
}
69
\OCP\Server::get(LoggerInterface::class)->error($e->getMessage(), ['app' => 'remote','exception' => $e]);
70
\OCP\Server::get(ITemplateManager::class)->printExceptionErrorPage($e, $status);
0 commit comments