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(adyen): stop retrying syncs missing a required identifier (#96319)

Tom Owersc195e2cb6298
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/adyen/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/adyen/source.py
index 08c857ee9b98..baa596219a62 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/adyen/source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/adyen/source.py
@@ -63,6 +63,12 @@ class AdyenSource(ResumableSource[AdyenSourceConfig, AdyenResumeConfig]):
return {
"401 Client Error: Unauthorized": "Adyen rejected the API key. Check the key, and that it matches the environment you selected.",
"403 Client Error: Forbidden": "Adyen denied access. Check that the API credential has the roles needed for the tables you're syncing.",
+ # None deliberately: _require_identifier already raises these naming the exact missing
+ # or malformed field, so a curated message would just repeat it with less precision.
+ "Balance platform ID is required to sync this table.": None,
+ "Merchant account is required to sync this table.": None,
+ "Balance platform ID contains unsupported characters.": None,
+ "Merchant account contains unsupported characters.": None,
}
def get_canonical_descriptions(self) -> CanonicalDescriptions:
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/adyen/tests/test_adyen_source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/adyen/tests/test_adyen_source.py
index 07ffe6c1cf1f..fb82bc9ffe94 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/adyen/tests/test_adyen_source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/adyen/tests/test_adyen_source.py
@@ -98,3 +98,28 @@ class TestAdyenSource:
for key in ADYEN_ENDPOINTS[endpoint].primary_key:
assert key in columns
+
+ @parameterized.expand(
+ [
+ ("Balance platform ID is required to sync this table.",),
+ ("Merchant account is required to sync this table.",),
+ ("Balance platform ID contains unsupported characters.",),
+ ("Merchant account contains unsupported characters.",),
+ ]
+ )
+ def test_non_retryable_errors_match_missing_or_malformed_identifiers(self, observed_error: str) -> None:
+ non_retryable_errors = self.source.get_non_retryable_errors()
+
+ assert any(key in observed_error for key in non_retryable_errors)
+
+ @parameterized.expand(
+ [
+ ("HTTPSConnectionPool(host='balanceplatform-api-live.adyen.com', port=443): Read timed out.",),
+ ("500 Server Error: Internal Server Error",),
+ ("Connection reset by peer",),
+ ]
+ )
+ def test_non_retryable_errors_do_not_match_transient_errors(self, other_error: str) -> None:
+ non_retryable_errors = self.source.get_non_retryable_errors()
+
+ assert not any(key in other_error for key in non_retryable_errors)