summaryrefslogtreecommitdiffstats
path: root/gluster/swift/common/middleware/gswauth/bin/swauth-add-account
diff options
context:
space:
mode:
Diffstat (limited to 'gluster/swift/common/middleware/gswauth/bin/swauth-add-account')
-rwxr-xr-xgluster/swift/common/middleware/gswauth/bin/swauth-add-account10
1 files changed, 9 insertions, 1 deletions
diff --git a/gluster/swift/common/middleware/gswauth/bin/swauth-add-account b/gluster/swift/common/middleware/gswauth/bin/swauth-add-account
index 88f8010..92b6b73 100755
--- a/gluster/swift/common/middleware/gswauth/bin/swauth-add-account
+++ b/gluster/swift/common/middleware/gswauth/bin/swauth-add-account
@@ -66,4 +66,12 @@ if __name__ == '__main__':
ssl=(parsed.scheme == 'https'))
resp = conn.getresponse()
if resp.status // 100 != 2:
- exit('Account creation failed: %s %s' % (resp.status, resp.reason))
+ if resp.status == 401:
+ exit('Account creation failed: %s %s: Invalid user/key provided' %
+ (resp.status, resp.reason))
+ elif resp.status == 403:
+ exit('Account creation failed: %s %s: Insufficient priveleges' %
+ (resp.status, resp.reason))
+ else:
+ exit('Account creation failed: %s %s' %
+ (resp.status, resp.reason))