diff options
Diffstat (limited to 'gluster/swift/common/middleware/gswauth/bin/gswauth-add-account')
-rwxr-xr-x | gluster/swift/common/middleware/gswauth/bin/gswauth-add-account | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gluster/swift/common/middleware/gswauth/bin/gswauth-add-account b/gluster/swift/common/middleware/gswauth/bin/gswauth-add-account index 9ac5919..0f72f06 100755 --- a/gluster/swift/common/middleware/gswauth/bin/gswauth-add-account +++ b/gluster/swift/common/middleware/gswauth/bin/gswauth-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 privileges' % + (resp.status, resp.reason)) + else: + exit('Account creation failed: %s %s' % + (resp.status, resp.reason)) |