From 85d23dd6fcefe0acf07b152c9ae57824e02e0429 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 7 Feb 2018 17:26:42 +0100 Subject: better error message on catalog error Signed-off-by: Robin Appelman --- lib/private/Files/ObjectStore/Swift.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/private/Files/ObjectStore') diff --git a/lib/private/Files/ObjectStore/Swift.php b/lib/private/Files/ObjectStore/Swift.php index 70bc4ed8438..f9c53fd333f 100644 --- a/lib/private/Files/ObjectStore/Swift.php +++ b/lib/private/Files/ObjectStore/Swift.php @@ -117,6 +117,10 @@ class Swift implements IObjectStore { /** @var Catalog $catalog */ $catalog = $this->client->getCatalog(); + if (count($catalog->getItems()) === 0) { + throw new StorageAuthException('Keystone did not provide a valid catalog, verify the credentials'); + } + if (isset($this->params['serviceName'])) { $serviceName = $this->params['serviceName']; } else { -- cgit v1.2.3