From 1ca686935159da7de600e718fa85260ea77c060d Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Tue, 5 Dec 2023 10:51:09 +0000 Subject: [PATCH] fix: don't swallow xmlsec error in debug mode on startup --- posthog/urls.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/posthog/urls.py b/posthog/urls.py index c271406c73469..343e699bb8eaa 100644 --- a/posthog/urls.py +++ b/posthog/urls.py @@ -54,11 +54,17 @@ ) from .year_in_posthog import year_in_posthog +import structlog + +logger = structlog.get_logger(__name__) + ee_urlpatterns: List[Any] = [] try: from ee.urls import extend_api_router from ee.urls import urlpatterns as ee_urlpatterns except ImportError: + if settings.DEBUG: + logger.warn(f"Could not import ee.urls", exc_info=True) pass else: extend_api_router(