Browse Source

Improves error response client compatibility

Alessandro Pilotti 9 years ago
parent
commit
49451be0bd
1 changed files with 2 additions and 1 deletions
  1. 2 1
      coriolis/api/wsgi.py

+ 2 - 1
coriolis/api/wsgi.py

@@ -1215,7 +1215,8 @@ class Fault(webob.exc.HTTPException):
         fault_name = self._fault_names.get(code, "computeFault")
         fault_name = self._fault_names.get(code, "computeFault")
         explanation = self.wrapped_exc.explanation
         explanation = self.wrapped_exc.explanation
         fault_data = {
         fault_data = {
-            fault_name: {
+            'error': {
+                'fault': fault_name,
                 'code': code,
                 'code': code,
                 'message': i18n.translate(explanation, locale)}}
                 'message': i18n.translate(explanation, locale)}}
         if code == 413:
         if code == 413: