From 3d6be69f25d1bffc17d252b6e230fecf3618ac9b Mon Sep 17 00:00:00 2001
From: Vincent Petry <pvince81@owncloud.com>
Date: Mon, 13 Jul 2015 18:51:25 +0200
Subject: [PATCH] Throw storage not available on guzzle error

If the remote server is in maintenance mode, we must throw storage not
available exception instead of not found which might auto-remove the
share.
---
 apps/files_sharing/lib/external/storage.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apps/files_sharing/lib/external/storage.php b/apps/files_sharing/lib/external/storage.php
index 3284a60172f..dc8d1738b05 100644
--- a/apps/files_sharing/lib/external/storage.php
+++ b/apps/files_sharing/lib/external/storage.php
@@ -253,7 +253,7 @@ class Storage extends DAV implements ISharedStorage {
 			// throw this to be on the safe side: the share will still be visible
 			// in the UI in case the failure is intermittent, and the user will
 			// be able to decide whether to remove it if it's really gone
-			throw new NotFoundException();
+			throw new StorageNotAvailableException();
 		}
 
 		return json_decode($response->getBody(), true);
-- 
GitLab