summaryrefslogtreecommitdiffstats
path: root/module/obmc/wsgi
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2017-03-07 10:22:40 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-03-07 10:24:12 -0500
commit9c2531ee514a5446ccfbe89a407bf2d23a24dc39 (patch)
treea7520f9b94a6700174201ed932dcae3a00247be5 /module/obmc/wsgi
parent56ad87f338efcabdfd2c99a1a6fa99bd94412b3e (diff)
downloadphosphor-rest-server-9c2531ee514a5446ccfbe89a407bf2d23a24dc39.tar.gz
phosphor-rest-server-9c2531ee514a5446ccfbe89a407bf2d23a24dc39.zip
Fix error response status regression
080a48e introduces a regression where the status field is missing from the response for non 2xx responses. Resolves openbmc/openbmc#1246 Change-Id: Idb18b100c9ebb34275b5c24f7609748603749d58 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'module/obmc/wsgi')
-rw-r--r--module/obmc/wsgi/apps/rest_dbus.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/module/obmc/wsgi/apps/rest_dbus.py b/module/obmc/wsgi/apps/rest_dbus.py
index 5400ced..1337873 100644
--- a/module/obmc/wsgi/apps/rest_dbus.py
+++ b/module/obmc/wsgi/apps/rest_dbus.py
@@ -720,6 +720,7 @@ class JsonApiResponsePlugin(object):
def error_callback(self, error, response_object, **kw):
response_object['message'] = error.status_line
+ response_object['status'] = 'error'
response_object.setdefault('data', {})['description'] = str(error.body)
if error.status_code == 500:
response_object['data']['exception'] = repr(error.exception)
OpenPOWER on IntegriCloud