ClientException is insufficient for effectively responding to error situations

Bug #1493470 reported by Chris Dent
6
This bug affects 1 person
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 AuthorizationException which helps to distinguish the type of error?

This problem is similar to, but not quite the same as https://bugs.launchpad.net/python-swiftclient/+bug/1379249

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.