:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(debugbear): treat a 410 from the api as non-retryable (#128452)
Tom Owers264ed6bd7fcc
diff --git a/products/warehouse_sources/sources/debugbear/source.py b/products/warehouse_sources/sources/debugbear/source.pyindex c847362d239c..fdb25bbffcf6 100644--- a/products/warehouse_sources/sources/debugbear/source.py+++ b/products/warehouse_sources/sources/debugbear/source.py@@ -40,6 +40,7 @@ class DebugbearSource(SimpleSource[DebugbearSourceConfig]):return {"401 Client Error": "Your DebugBear API key is invalid or expired. Please generate a new key and reconnect.","403 Client Error": "Your DebugBear API key doesn't have permission for this request. Use an Admin API key (Account settings > API Keys) and reconnect.",+ "410 Client Error: Gone for url: https://www.debugbear.com": "DebugBear no longer serves this API endpoint, or the account behind this API key was removed. Please contact support to move this source to a supported DebugBear API version.",# Raised by `_iter_rum_metrics_for_project` after DebugBear 400s on a project with no# RUM data; the raw message already names the project and the likely fix."DebugBear rejected the RUM metrics request": None,diff --git a/products/warehouse_sources/sources/debugbear/tests/test_debugbear_source.py b/products/warehouse_sources/sources/debugbear/tests/test_debugbear_source.pyindex 4a2e7ced139a..921837c18b89 100644--- a/products/warehouse_sources/sources/debugbear/tests/test_debugbear_source.py+++ b/products/warehouse_sources/sources/debugbear/tests/test_debugbear_source.py@@ -27,6 +27,10 @@ class TestDebugbearSource:"DebugBear rejected the RUM metrics request for project 1 with a 400 error — ""Real User Monitoring is likely not set up for this project.",),+ (+ "410 Client Error: Gone for url: https://www.debugbear.com",+ "410 Client Error: Gone for url: https://www.debugbear.com/api/v1/projects",+ ),],)def test_non_retryable_errors_match(self, pattern: str, message: str) -> None: