Explorar el Código

Improves error response client compatibility

Alessandro Pilotti hace 10 años
padre
commit
49451be0bd
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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: