Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
backend: add sentry debug on DEV env
Browse files Browse the repository at this point in the history
  • Loading branch information
drjova committed Jul 31, 2024
1 parent df78a5f commit ac84aee
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions backoffice/config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
path("api/token/refresh/", TokenRefreshView.as_view(), name="token_refresh"),
]


def sentry_trigger_error(request):
division_by_zero = 1 / 0 # noqa


if settings.DEBUG:
# This allows the error pages to be debugged during development, just visit
# these url in browser to see how these error pages look like.
Expand All @@ -62,7 +67,9 @@
kwargs={"exception": Exception("Page not Found")},
),
path("500/", default_views.server_error),
path("sentry-debug/", sentry_trigger_error),
]

if "debug_toolbar" in settings.INSTALLED_APPS:
import debug_toolbar

Expand Down

0 comments on commit ac84aee

Please sign in to comment.