diff --git a/lib/private/Console/Application.php b/lib/private/Console/Application.php index 07e9dbb317b27..ef8ad9210cfae 100644 --- a/lib/private/Console/Application.php +++ b/lib/private/Console/Application.php @@ -32,6 +32,7 @@ use OC\MemoryInfo; use OC\NeedsUpdateException; +use OC\ServiceUnavailableException; use OC_App; use OCP\AppFramework\QueryException; use OCP\App\IAppManager; @@ -187,8 +188,9 @@ private function writeMaintenanceModeInfo( $errOutput = $output->getErrorOutput(); $errOutput->writeln( 'Nextcloud is in maintenance mode, hence the database isn\'t accessible.' . PHP_EOL . - 'Cannot perform any command except \'maintenance:mode --off\'' . PHP_EOL + 'Cannot perform any command except \'maintenance:mode --off\' and \'status\'' . PHP_EOL ); + throw new ServiceUnavailableException(); } }