[PATCH phosphor-rest-server] Set response type correctly for errors

OpenBMC Patches openbmc-patches at stwcx.xyz
Wed Nov 18 01:20:27 AEDT 2015


From: Brad Bishop <bradleyb at us.ibm.com>

Error response type was 'text/html' but should be
'application/json'
---
 obmc-rest | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/obmc-rest b/obmc-rest
index f655599..017a736 100644
--- a/obmc-rest
+++ b/obmc-rest
@@ -509,7 +509,7 @@ class JsonApiErrorsPlugin(object):
 			response_object['data']['traceback'] = error.traceback.splitlines()
 
 		json_response = json.dumps(response_object, **self.json_opts)
-		res.content_type = 'application/json'
+		response.content_type = 'application/json'
 		return json_response
 
 class RestApp(Bottle):
-- 
2.6.3




More information about the openbmc mailing list