Przeglądaj źródła

include traceback in handled decorator to

Bastien Sevajol 6 lat temu
rodzic
commit
251f46fd0c
1 zmienionych plików z 4 dodań i 1 usunięć
  1. 4 1
      hapic/decorator.py

+ 4 - 1
hapic/decorator.py Wyświetl plik

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