client shouldn't return http errors directly
Bug #1431514 reported by
Steve Heyman
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-barbicanclient |
Fix Released
|
Medium
|
John Vrbanac |
Bug Description
Today we return http errors for some problems encountered by the client. This isn't terribly friendly and breaks encapsulation by exposing the underlying logic for handling requests.
It also makes it difficult to write code to leverage our client as you need to be aware of both ValueErrors and http errors for the same API call (a good example is passing an invalid secret ref - pass in a nonsense string and you get ValueError, but pass an invalid yet well formed UUID and you get http error).
We should be consistent in how we return errors, so this bug suggests that we catch those http errors and instead return them as value errors with the appropriate error messages.
Changed in python-barbicanclient: | |
status: | New → Confirmed |
Changed in python-barbicanclient: | |
milestone: | none → 3.1.0 |
Changed in python-barbicanclient: | |
status: | Confirmed → In Progress |
assignee: | nobody → John Vrbanac (john.vrbanac) |
Changed in python-barbicanclient: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/171839 /git.openstack. org/cgit/ openstack/ python- barbicanclient/ commit/ ?id=e06df05a697 55f2231bc6fb181 1a5bcfacd1b6ed
Committed: https:/
Submitter: Jenkins
Branch: master
commit e06df05a69755f2 231bc6fb1811a5b cfacd1b6ed
Author: John Vrbanac <email address hidden>
Date: Wed Apr 8 17:17:32 2015 -0500
Raising errors from the client instead of ksclient
Consolidates HTTPError types into barbicanclient. exceptions.
Provides a uniform way of external consumers to catch
common exceptions that might occur as a result of normal
client operation.
Fixes bug 1431514
Change-Id: Id65e7da913bb06 e2f94a50f445501 99dc7f1beb6