diff options
| author | Jenkins <jenkins@review.openstack.org> | 2011-11-08 14:10:35 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2011-11-08 14:10:35 +0000 |
| commit | 3f8fad9653b9e5530e8d87f7cab95ed844a2f26a (patch) | |
| tree | f1addefb8ab9dc64d1ad39caba965300715eea61 /nova/api | |
| parent | 89a200d9f2828316572f6811f177df8f82cfbd6f (diff) | |
| parent | affb5821342b91f4371fe79e82a6a28a54d97bc7 (diff) | |
| download | nova-3f8fad9653b9e5530e8d87f7cab95ed844a2f26a.tar.gz nova-3f8fad9653b9e5530e8d87f7cab95ed844a2f26a.tar.xz nova-3f8fad9653b9e5530e8d87f7cab95ed844a2f26a.zip | |
Merge "Clean up docstrings for faults.Fault and it's usage"
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/faults.py | 2 | ||||
| -rw-r--r-- | nova/api/openstack/wsgi.py | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/nova/api/openstack/faults.py b/nova/api/openstack/faults.py index 0ef863eed..52d64c283 100644 --- a/nova/api/openstack/faults.py +++ b/nova/api/openstack/faults.py @@ -24,7 +24,7 @@ from nova.api.openstack import wsgi class Fault(webob.exc.HTTPException): - """An RS API fault response.""" + """Wrap webob.exc.HTTPException to provide API friendly response.""" _fault_names = { 400: "badRequest", diff --git a/nova/api/openstack/wsgi.py b/nova/api/openstack/wsgi.py index a3ca5cd5b..f96a12eab 100644 --- a/nova/api/openstack/wsgi.py +++ b/nova/api/openstack/wsgi.py @@ -527,6 +527,9 @@ class Resource(wsgi.Application): They may raise a webob.exc exception or return a dict, which will be serialized by requested content type. + Exceptions derived from webob.exc.HTTPException will be automatically + wrapped in faults.Fault() to provide API friendly error responses. + """ def __init__(self, controller, deserializer=None, serializer=None): |
