Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable29] fix: make swift connect exception message more informative #47873

Merged
merged 1 commit into from
Sep 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/private/Files/ObjectStore/SwiftFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,13 @@ private function auth($authService, string $cacheKey) {
} catch (ClientException $e) {
$statusCode = $e->getResponse()->getStatusCode();
if ($statusCode === 404) {
throw new StorageAuthException('Keystone not found, verify the keystone url', $e);
throw new StorageAuthException('Keystone not found while connecting to object storage, verify the keystone url', $e);
} elseif ($statusCode === 412) {
throw new StorageAuthException('Precondition failed, verify the keystone url', $e);
throw new StorageAuthException('Precondition failed while connecting to object storage, verify the keystone url', $e);
} elseif ($statusCode === 401) {
throw new StorageAuthException('Authentication failed, verify the username, password and possibly tenant', $e);
throw new StorageAuthException('Authentication failed while connecting to object storage, verify the username, password and possibly tenant', $e);
} else {
throw new StorageAuthException('Unknown error', $e);
throw new StorageAuthException('Unknown error while connecting to object storage', $e);
}
} catch (RequestException $e) {
throw new StorageAuthException('Connection reset while connecting to keystone, verify the keystone url', $e);
Expand Down
Loading