{"record":{"id":"e42c6bd8af4e9839","repo":"nextcloud/server","slug":"system-is-in-maintenance-mode","errorCode":null,"errorMessage":"System is in maintenance mode.","messagePattern":"System is in maintenance mode\\.","errorType":"exception","errorClass":"OCA\\DAV\\Exception\\ServerMaintenanceMode","httpStatus":503,"severity":"error","filePath":"apps/dav/lib/Connector/Sabre/MaintenancePlugin.php","lineNumber":61,"sourceCode":"\t *\n\t * @param \\Sabre\\DAV\\Server $server\n\t * @return void\n\t */\n\t#[\\Override]\n\tpublic function initialize(\\Sabre\\DAV\\Server $server) {\n\t\t$this->server = $server;\n\t\t$this->server->on('beforeMethod:*', [$this, 'checkMaintenanceMode'], 1);\n\t}\n\n\t/**\n\t * This method is called before any HTTP method and returns http status code 503\n\t * in case the system is in maintenance mode.\n\t *\n\t * @throws ServiceUnavailable\n\t */\n\tpublic function checkMaintenanceMode(): bool {\n\t\tif ($this->config->getSystemValueBool('maintenance')) {\n\t\t\tthrow new ServerMaintenanceMode($this->l10n->t('System is in maintenance mode.'));\n\t\t}\n\t\tif (Util::needUpgrade()) {\n\t\t\tthrow new ServerMaintenanceMode($this->l10n->t('Upgrade needed'));\n\t\t}\n\n\t\treturn true;\n\t}\n}\n","sourceCodeStart":43,"sourceCodeEnd":70,"githubUrl":"https://github.com/nextcloud/server/blob/ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php#L43-L70","documentation":"Error \"System is in maintenance mode.\" thrown in nextcloud/server.","triggerScenarios":"Thrown at apps/dav/lib/Connector/Sabre/MaintenancePlugin.php:61 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3","analyzedAt":"2026-08-17T01:36:13.386Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}