Преглед изворни кода

Improves error response client compatibility

Alessandro Pilotti пре 9 година
родитељ
комит
49451be0bd
1 измењених фајлова са 2 додато и 1 уклоњено
  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")
         explanation = self.wrapped_exc.explanation
         fault_data = {
-            fault_name: {
+            'error': {
+                'fault': fault_name,
                 'code': code,
                 'message': i18n.translate(explanation, locale)}}
         if code == 413: