Explorar o código

Improves error response client compatibility

Alessandro Pilotti %!s(int64=10) %!d(string=hai) anos
pai
achega
49451be0bd
Modificáronse 1 ficheiros con 2 adicións e 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: