]> source.dussan.org Git - nextcloud-server.git/commitdiff
Properly catch guzzle 503 when querying share info
authorVincent Petry <pvince81@owncloud.com>
Thu, 9 Apr 2015 16:55:28 +0000 (18:55 +0200)
committerVincent Petry <pvince81@owncloud.com>
Thu, 9 Apr 2015 16:55:28 +0000 (18:55 +0200)
apps/files_sharing/lib/external/storage.php

index 91beccf74916a364bd3c562a9165005617733be5..0238f5ad4afa05ba4e9d76b5da107eb84f3e25fe 100644 (file)
@@ -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;
                }