Browse Source

correctly dump error response

Bastien Sevajol 6 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
                             exc,
206
                             exc,
207
                             include_traceback=self.is_debug(),
207
                             include_traceback=self.is_debug(),
208
                         )
208
                         )
209
+                        dumped = error_builder.dump(error_body).data
209
                         return self.get_response(
210
                         return self.get_response(
210
-                            json.dumps(error_body),
211
+                            json.dumps(dumped),
211
                             handled_exception.http_code,
212
                             handled_exception.http_code,
212
                         )
213
                         )
213
                 raise exc
214
                 raise exc