summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2018-02-07 17:26:42 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-02-08 15:18:26 +0100
commit85d23dd6fcefe0acf07b152c9ae57824e02e0429 (patch)
tree19de2b3f948687bc3f4a00cbd65c136d7c5bf474
parentdf6e23c98ce3d5a50c417a085f2095f42b663efa (diff)
downloadnextcloud-server-85d23dd6fcefe0acf07b152c9ae57824e02e0429.tar.gz
nextcloud-server-85d23dd6fcefe0acf07b152c9ae57824e02e0429.zip
better error message on catalog error
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r--lib/private/Files/Mount/ObjectHomeMountProvider.php3
-rw-r--r--lib/private/Files/ObjectStore/Swift.php4
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/Files/Mount/ObjectHomeMountProvider.php b/lib/private/Files/Mount/ObjectHomeMountProvider.php
index 440a8bc4608..9c09c0737c8 100644
--- a/lib/private/Files/Mount/ObjectHomeMountProvider.php
+++ b/lib/private/Files/Mount/ObjectHomeMountProvider.php
@@ -84,10 +84,11 @@ class ObjectHomeMountProvider implements IHomeMountProvider {
if (!isset($config['arguments'])) {
$config['arguments'] = [];
}
- $config['arguments']['user'] = $user;
// instantiate object store implementation
$config['arguments']['objectstore'] = new $config['class']($config['arguments']);
+ $config['arguments']['user'] = $user;
+
return $config;
}
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 {