better error message on catalog error

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2018-02-07 17:26:42 +01:00 committed by Roeland Jago Douma
parent df6e23c98c
commit 85d23dd6fc
No known key found for this signature in database
GPG Key ID: F941078878347C0C
2 changed files with 6 additions and 1 deletions

View File

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

View File

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