pydantic/logfire

Sending traceback with Django Ninja

Open

#923 创建于 2025年3月12日

在 GitHub 查看
 (5 评论) (0 反应) (0 负责人)Python (244 fork)github user discovery
good first issue

仓库指标

Star
 (4,282 star)
PR 合并指标
 (平均合并 7天 8小时) (30 天内合并 35 个 PR)

描述

Question

Is it possible to send traceback along with the log? I am using Django.

This is the log I want to send along with with the log

Simulate unhandled exception
Traceback (most recent call last):
  File "/workspaces/gateway/.venv/lib/python3.12/site-packages/ninja/operation.py", line 120, in run
    result = self.view_func(request, **values)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspaces/gateway/app/appcore/routes/sample.py", line 135, in get_simulate_unhandled_exception
    raise Exception("Simulate unhandled exception")
Exception: Simulate unhandled exception

贡献者指南