Browse Source

better error message on catalog error

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/8235/head
Robin Appelman 8 years ago
committed by Roeland Jago Douma
parent
commit
85d23dd6fc
No known key found for this signature in database GPG Key ID: F941078878347C0C
  1. 3
      lib/private/Files/Mount/ObjectHomeMountProvider.php
  2. 4
      lib/private/Files/ObjectStore/Swift.php

3
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;
}

4
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 {

Loading…
Cancel
Save