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(resend): say what to do when Resend rejects the API key (#104239)

Tom Owersdf65163a8689
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/resend/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/resend/source.py
index f2aa8b84c866..3c757c77d57f 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/resend/source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/resend/source.py
@@ -194,7 +194,10 @@ Either way, the connection needs **full access** so the following resources can
if config.auth_method.selection == "oauth":
return False, "Your Resend connection is invalid or expired. Please reconnect it."
- return False, "Invalid Resend API key"
+ return (
+ False,
+ "Resend rejected the API key. Generate a new API key in your Resend dashboard, then enter it here.",
+ )
def get_non_retryable_errors(self) -> dict[str, str | None]:
return {
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/resend/tests/test_resend_source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/resend/tests/test_resend_source.py
index a33455049c77..9cf27aa194cb 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/resend/tests/test_resend_source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/resend/tests/test_resend_source.py
@@ -96,7 +96,7 @@ class TestResendSource:
is_valid, error_message = self.source.validate_credentials(self.config, self.team_id)
assert is_valid is False
- assert error_message == "Invalid Resend API key"
+ assert error_message is not None and "Generate a new API key" in error_message
def test_validate_credentials_api_key_missing(self):
config = ResendSourceConfig(auth_method=ResendAuthMethodConfig(selection="api_key", api_key=None))