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): tell users how to fix an invalid sendgrid api key (#126364)

Tom Owersef379f9123a4
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/sendgrid/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/sendgrid/source.py
index 7ecf9667945a..8d29090d2265 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/sendgrid/source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/sendgrid/source.py
@@ -157,7 +157,10 @@ class SendGridSource(ResumableSource[SendGridSourceConfig, SendGridResumeConfig]
return False, "Your SendGrid API key is missing the scope required to sync this data."
if status == 401:
- return False, "Invalid SendGrid API key"
+ return (
+ False,
+ "Your SendGrid API key is invalid. Create a new key in SendGrid under Settings > API Keys, then paste the full key here.",
+ )
return False, "Could not validate SendGrid API key"