Browse Source

correctly dump error response

Bastien Sevajol 5 years ago
parent
commit
ea31eb8ac9
1 changed files with 2 additions and 1 deletions
  1. 2 1
      hapic/context.py

+ 2 - 1
hapic/context.py View File

@@ -206,8 +206,9 @@ class BaseContext(ContextInterface):
206 206
                             exc,
207 207
                             include_traceback=self.is_debug(),
208 208
                         )
209
+                        dumped = error_builder.dump(error_body).data
209 210
                         return self.get_response(
210
-                            json.dumps(error_body),
211
+                            json.dumps(dumped),
211 212
                             handled_exception.http_code,
212 213
                         )
213 214
                 raise exc