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>
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 @@
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)