summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/faults.py2
-rw-r--r--nova/api/openstack/wsgi.py3
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):