summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php')
-rw-r--r--apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php b/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php
index dce2f9c45e4..ca2195fc65a 100644
--- a/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php
@@ -28,8 +28,7 @@
namespace OCA\DAV\Connector\Sabre;
use OCP\ILogger;
-use Sabre\DAV\Exception;
-use Sabre\HTTP\Response;
+use Sabre\DAV\Exception\ServiceUnavailable;
class ExceptionLoggerPlugin extends \Sabre\DAV\ServerPlugin {
protected $nonFatalExceptions = [
@@ -90,7 +89,12 @@ class ExceptionLoggerPlugin extends \Sabre\DAV\ServerPlugin {
public function logException(\Exception $ex) {
$exceptionClass = get_class($ex);
$level = \OCP\Util::FATAL;
- if (isset($this->nonFatalExceptions[$exceptionClass])) {
+ if (isset($this->nonFatalExceptions[$exceptionClass]) ||
+ (
+ $exceptionClass === ServiceUnavailable::class &&
+ $ex->getMessage() === 'System in maintenance mode.'
+ )
+ ) {
$level = \OCP\Util::DEBUG;
}