From b89c5e228f71168aa1f16188f1357d4fbe86df92 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Mon, 24 Jun 2024 09:59:59 +0100 Subject: [PATCH] feat: remove exceptions to ignore from decide (#23177) --- posthog/api/decide.py | 1 - posthog/api/test/test_decide.py | 30 +++--------------------------- 2 files changed, 3 insertions(+), 28 deletions(-) diff --git a/posthog/api/decide.py b/posthog/api/decide.py index d2c61a8924bb9..5b2ac2257a2ae 100644 --- a/posthog/api/decide.py +++ b/posthog/api/decide.py @@ -224,7 +224,6 @@ def get_decide(request: HttpRequest): response["autocaptureExceptions"] = ( { "endpoint": "/e/", - "errors_to_ignore": team.autocapture_exceptions_errors_to_ignore or [], } if team.autocapture_exceptions_opt_in else False diff --git a/posthog/api/test/test_decide.py b/posthog/api/test/test_decide.py index c4c4b9d96358c..fd265ea60b98d 100644 --- a/posthog/api/test/test_decide.py +++ b/posthog/api/test/test_decide.py @@ -369,31 +369,7 @@ def test_exception_autocapture_opt_in(self, *args): response = self._post_decide().json() self.assertEqual( response["autocaptureExceptions"], - {"errors_to_ignore": [], "endpoint": "/e/"}, - ) - - def test_exception_autocapture_errors_to_ignore(self, *args): - # :TRICKY: Test for regression around caching - response = self._post_decide().json() - self.assertEqual(response["autocaptureExceptions"], False) - - self._update_team({"autocapture_exceptions_opt_in": True}) - self._update_team( - { - "autocapture_exceptions_errors_to_ignore": [ - "ResizeObserver loop limit exceeded", - ".* bot .*", - ] - } - ) - - response = self._post_decide().json() - self.assertEqual( - response["autocaptureExceptions"], - { - "errors_to_ignore": ["ResizeObserver loop limit exceeded", ".* bot .*"], - "endpoint": "/e/", - }, + {"endpoint": "/e/"}, ) def test_user_session_recording_opt_in_wildcard_domain(self, *args): @@ -2719,7 +2695,7 @@ def test_decide_doesnt_error_out_when_database_is_down(self, *args): self.assertEqual(response["featureFlags"], {}) self.assertEqual( response["autocaptureExceptions"], - {"errors_to_ignore": [], "endpoint": "/e/"}, + {"endpoint": "/e/"}, ) # now database is down @@ -2743,7 +2719,7 @@ def test_decide_doesnt_error_out_when_database_is_down(self, *args): self.assertEqual(response["capturePerformance"], True) self.assertEqual( response["autocaptureExceptions"], - {"errors_to_ignore": [], "endpoint": "/e/"}, + {"endpoint": "/e/"}, ) self.assertEqual(response["featureFlags"], {})