瀏覽代碼

include traceback in handled decorator to

Bastien Sevajol 6 年之前
父節點
當前提交
251f46fd0c
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      hapic/decorator.py

+ 4 - 1
hapic/decorator.py 查看文件

@@ -420,7 +420,10 @@ class ExceptionHandlerControllerWrapper(ControllerWrapper):
420 420
                 func_kwargs,
421 421
             )
422 422
         except self.handled_exception_class as exc:
423
-            response_content = self.error_builder.build_from_exception(exc)
423
+            response_content = self.error_builder.build_from_exception(
424
+                exc,
425
+                include_traceback=self.context.is_debug(),
426
+            )
424 427
 
425 428
             # Check error format
426 429
             dumped = self.error_builder.dump(response_content).data