summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/external
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-04-09 18:55:28 +0200
committerVincent Petry <pvince81@owncloud.com>2015-04-09 18:55:28 +0200
commit4feb97d8e428635f2c445b9ab0be24a90f6dfa16 (patch)
tree848429330cd14046bbc0e4f2608d95e166bfbdbb /apps/files_sharing/lib/external
parentde4a81f4623cf86fd77f56d8f9820742c52bd7e1 (diff)
downloadnextcloud-server-4feb97d8e428635f2c445b9ab0be24a90f6dfa16.tar.gz
nextcloud-server-4feb97d8e428635f2c445b9ab0be24a90f6dfa16.zip
Properly catch guzzle 503 when querying share info
Diffstat (limited to 'apps/files_sharing/lib/external')
-rw-r--r--apps/files_sharing/lib/external/storage.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/external/storage.php b/apps/files_sharing/lib/external/storage.php
index 91beccf7491..0238f5ad4af 100644
--- a/apps/files_sharing/lib/external/storage.php
+++ b/apps/files_sharing/lib/external/storage.php
@@ -199,6 +199,11 @@ class Storage extends DAV implements ISharedStorage {
$this->manager->removeShare($this->mountPoint);
$this->manager->getMountManager()->removeMount($this->mountPoint);
throw new StorageInvalidException();
+ } catch (\GuzzleHttp\Exception\RequestException $e) {
+ if ($e->getCode() === 503) {
+ throw new StorageNotAvailableException();
+ }
+ throw $e;
} catch (\Exception $e) {
throw $e;
}