Skip to content

: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.

fix(data-warehouse): stop blaming the chargebee key for a per-table 403 (#113935)

Tom Owers444ca5a6ce7c
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/chargebee/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/chargebee/source.py
index 8c21fe6bfe7b..0bb50ffc4336 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/chargebee/source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/chargebee/source.py
@@ -52,8 +52,10 @@ class ChargebeeSource(ResumableSource[ChargebeeSourceConfig, ChargebeeResumeConf
def get_non_retryable_errors(self) -> dict[str, str | None]:
return {
- "403 Client Error: Forbidden for url": "Chargebee authentication failed. Please check your API key and site name.",
- "Unauthorized for url": "Chargebee authentication failed. Please check your API key and site name.",
+ # Credential validation already read customers with this key, so a 403 here is one resource
+ # the key can't read, not a wrong key or site name.
+ "403 Client Error: Forbidden for url": "Your Chargebee API key can't read one of the tables you sync. Give the key read access to that data in Chargebee, then reconnect the source.",
+ "Unauthorized for url": "Chargebee rejected your API key. Update the key in your Chargebee settings, then reconnect the source.",
}
def get_canonical_descriptions(self) -> CanonicalDescriptions: