From: Vincent Petry Date: Thu, 9 Apr 2015 16:55:28 +0000 (+0200) Subject: Properly catch guzzle 503 when querying share info X-Git-Tag: v8.1.0alpha1~39^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4feb97d8e428635f2c445b9ab0be24a90f6dfa16;p=nextcloud-server.git Properly catch guzzle 503 when querying share info --- 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; }