Browse Source

Fix flask get_validation_error_response

Bastien Sevajol 5 years ago
parent
commit
4a75a5950d
No account linked to committer's email
1 changed files with 2 additions and 2 deletions
  1. 2 2
      hapic/ext/flask/context.py

+ 2 - 2
hapic/ext/flask/context.py View File

@@ -74,7 +74,7 @@ class FlaskContext(BaseContext):
74 74
         )
75 75
 
76 76
         # Check error
77
-        dumped = self.default_error_builder.dump(error).data
77
+        dumped = self.default_error_builder.dump(error_content).data
78 78
         unmarshall = self.default_error_builder.load(dumped)
79 79
 
80 80
         if unmarshall.errors:
@@ -85,7 +85,7 @@ class FlaskContext(BaseContext):
85 85
             )
86 86
         from flask import Response
87 87
         return Response(
88
-            response=json.dumps(error_content),
88
+            response=json.dumps(dumped),
89 89
             mimetype='application/json',
90 90
             status=int(http_code),
91 91
         )