Browse Source

include traceback in handled decorator to

Bastien Sevajol 6 years ago
parent
commit
251f46fd0c
1 changed files with 4 additions and 1 deletions
  1. 4 1
      hapic/decorator.py

+ 4 - 1
hapic/decorator.py View File

420
                 func_kwargs,
420
                 func_kwargs,
421
             )
421
             )
422
         except self.handled_exception_class as exc:
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
             # Check error format
428
             # Check error format
426
             dumped = self.error_builder.dump(response_content).data
429
             dumped = self.error_builder.dump(response_content).data