From 73afca6207f2153e8e16de6f21a314e12b324776 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Fri, 10 Apr 2015 11:55:58 +0200 Subject: Catch more exceptions when connecting to remote DAV server Added InvalidArgumentException to catch HTML parsing errors when XML was expected. Made convertSabreException more generic to be able to handle more exception cases. --- apps/files_sharing/lib/external/storage.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apps/files_sharing/lib/external') diff --git a/apps/files_sharing/lib/external/storage.php b/apps/files_sharing/lib/external/storage.php index 0238f5ad4af..1dfef21ca75 100644 --- a/apps/files_sharing/lib/external/storage.php +++ b/apps/files_sharing/lib/external/storage.php @@ -199,6 +199,8 @@ class Storage extends DAV implements ISharedStorage { $this->manager->removeShare($this->mountPoint); $this->manager->getMountManager()->removeMount($this->mountPoint); throw new StorageInvalidException(); + } catch (\GuzzleHttp\Exception\ConnectException $e) { + throw new StorageNotAvailableException(); } catch (\GuzzleHttp\Exception\RequestException $e) { if ($e->getCode() === 503) { throw new StorageNotAvailableException(); -- cgit v1.2.3