ClientException is insufficient for effectively responding to error situations
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-swiftclient |
New
|
Undecided
|
Unassigned |
Bug Description
When using swiftclient, if there is an Authorization Error in get_auth_keystone the exception raised is a very generic ClientException without any http_status or any other distinguishing characteristics to determine that the error is in fact with auth, except for the text of the message.
This means that in order to branch on the type of error that has happened it is necessary to inspect the exception.msg. This is very fragile and likely unsafe over the long term (across versions).
Would it be reasonable to have an AuthorizationEx
This problem is similar to, but not quite the same as https:/