diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-10-25 13:19:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-25 13:19:46 +0200 |
commit | c0adc3c2cf2b2b6568dd5c16e9b3b286d4933ee9 (patch) | |
tree | 7683dcc2de51dbf8b55bf4673b0a7f5cc86ee339 /apps/dav | |
parent | 324e5b02ba7ee0610f4de5e708987d7907bb1db5 (diff) | |
parent | 44cf67accdc294f46bf82b3f8661f353dc5e22f0 (diff) | |
download | nextcloud-server-c0adc3c2cf2b2b6568dd5c16e9b3b286d4933ee9.tar.gz nextcloud-server-c0adc3c2cf2b2b6568dd5c16e9b3b286d4933ee9.zip |
Merge pull request #1883 from nextcloud/downstream-26145
Storage 503 message improvements
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php | 7 | ||||
-rw-r--r-- | apps/dav/lib/Connector/Sabre/ObjectTree.php | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php b/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php index 56a8b2b7641..4f7c2286827 100644 --- a/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php +++ b/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php @@ -32,7 +32,7 @@ use Sabre\DAV\Exception; use Sabre\HTTP\Response; class ExceptionLoggerPlugin extends \Sabre\DAV\ServerPlugin { - protected $nonFatalExceptions = array( + protected $nonFatalExceptions = [ 'Sabre\DAV\Exception\NotAuthenticated' => true, // If tokenauth can throw this exception (which is basically as // NotAuthenticated. So not fatal. @@ -47,7 +47,10 @@ class ExceptionLoggerPlugin extends \Sabre\DAV\ServerPlugin { // forbidden can be expected when trying to upload to // read-only folders for example 'Sabre\DAV\Exception\Forbidden' => true, - ); + // Happens when an external storage or federated share is temporarily + // not available + 'Sabre\DAV\Exception\StorageNotAvailableException' => true, + ]; /** @var string */ private $appName; diff --git a/apps/dav/lib/Connector/Sabre/ObjectTree.php b/apps/dav/lib/Connector/Sabre/ObjectTree.php index af1cf79e1db..554a7ad86ca 100644 --- a/apps/dav/lib/Connector/Sabre/ObjectTree.php +++ b/apps/dav/lib/Connector/Sabre/ObjectTree.php @@ -159,7 +159,7 @@ class ObjectTree extends \Sabre\DAV\Tree { try { $info = $this->fileView->getFileInfo($path); } catch (StorageNotAvailableException $e) { - throw new \Sabre\DAV\Exception\ServiceUnavailable('Storage not available'); + throw new \Sabre\DAV\Exception\ServiceUnavailable('Storage is temporarily not available'); } catch (StorageInvalidException $e) { throw new \Sabre\DAV\Exception\NotFound('Storage ' . $path . ' is invalid'); } catch (LockedException $e) { |