Marcin Sola
09/03/2026, 11:28 AMkapa.ai
09/03/2026, 11:28 AMsearch_analytics_error_handler in the connector's manifest, it only explicitly handles: [manifest error handler]
• Search Analytics QPS quota exceeded → RATE_LIMITED (60s backoff with jitter)
• Search Analytics load quota exceeded → RATE_LIMITED (15-min backoff)
• User does not have sufficient permission → IGNORE
• HTTP 400 → FAIL
There is no REFRESH_TOKEN_THEN_RETRY rule for HTTP 401, so a token expiry during sync causes an immediate crash.
What the fix looks like (for reference) Other connectors handle this pattern explicitly. For example, HubSpot's connector adds: [HubSpot manifest]
- type: HttpResponseFilter
action: REFRESH_TOKEN_THEN_RETRY
http_codes:
- 401
error_message: "Authentication token expired. Refreshing and retrying..."
This causes the CDK's OAuthAuthenticator to transparently fetch a new token and retry the request, rather than failing the sync. The HubSpot connector uses this exact approach because its tokens also expire during long syncs. [HubSpot contributing guide]
Recommended actions 1. File a GitHub issue on the Airbyte repository describing this behavior — the fix is a small manifest-only change adding REFRESH_TOKEN_THEN_RETRY for HTTP 401 to search_analytics_error_handler.
2. As a workaround, reducing the number of concurrent workers (num_workers config, default: 3, max: 50) may reduce the likelihood of hitting this race condition, since fewer workers mean less concurrent token usage pressure. [CONTRIBUTING.md]
3. If you're self-hosting and comfortable modifying the connector, adding the REFRESH_TOKEN_THEN_RETRY filter for HTTP 401 in the search_analytics_error_handler block of manifest.yaml is the correct fix. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.Marcin Sola
09/03/2026, 11:31 AMMarcin Sola
09/03/2026, 11:34 AMkapa.ai
09/03/2026, 11:34 AMairbyte-integrations/connectors/source-google-search-console/manifest.yaml
Where in the file Locate the search_analytics_error_handler block, which currently looks like this: [manifest]
definitions:
search_analytics_error_handler:
type: DefaultErrorHandler
backoff_strategies:
...
response_filters:
- type: HttpResponseFilter
action: RATE_LIMITED
error_message_contains: "Search Analytics QPS quota exceeded"
- type: HttpResponseFilter
action: RATE_LIMITED
error_message_contains: "Search Analytics load quota exceeded"
- type: HttpResponseFilter
action: IGNORE
error_message_contains: "User does not have sufficient permission"
error_message: "{{ response['error']['message'] }}"
- type: HttpResponseFilter
action: FAIL
http_codes:
- 400
error_message: >-
Invalid aggregationType ...
What to add Insert a new filter before the HTTP 400 FAIL entry (order matters — filters are evaluated sequentially and the first match wins): [error handling docs]
- type: HttpResponseFilter
action: REFRESH_TOKEN_THEN_RETRY
http_codes:
- 401
failure_type: transient_error
error_message: "Authentication token expired mid-sync. Refreshing token and retrying."
Result The full response_filters list should look like:
response_filters:
- type: HttpResponseFilter
action: RATE_LIMITED
error_message_contains: "Search Analytics QPS quota exceeded"
- type: HttpResponseFilter
action: RATE_LIMITED
error_message_contains: "Search Analytics load quota exceeded"
- type: HttpResponseFilter
action: IGNORE
error_message_contains: "User does not have sufficient permission"
error_message: "{{ response['error']['message'] }}"
- type: HttpResponseFilter # <-- ADD THIS
action: REFRESH_TOKEN_THEN_RETRY
http_codes:
- 401
failure_type: transient_error
error_message: "Authentication token expired mid-sync. Refreshing token and retrying."
- type: HttpResponseFilter
action: FAIL
http_codes:
- 400
error_message: >-
Invalid aggregationType ...
REFRESH_TOKEN_THEN_RETRY will instruct the CDK's OAuthAuthenticator to fetch a fresh token and replay the failed request, which is the same mechanism HubSpot uses for the same problem. [HubSpot CONTRIBUTING]
> Note: After editing the manifest, you will need to rebuild and redeploy the connector image for the change to take effect in your self-hosted environment. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.Marcin Sola
09/03/2026, 11:41 AMkapa.ai
09/03/2026, 11:41 AM1.2.2 2023-08-23 [29741] Handle HTTP-401, HTTP-403 errors
What appears to have happened The connector went through a major refactor at some point and was eventually rebuilt as a manifest-only (low-code CDK) connector. During that migration, the 401/403 handling was replaced with the current search_analytics_error_handler, which only handles specific 403 message strings rather than generic HTTP status codes: [manifest]
• "Search Analytics QPS quota exceeded" → RATE_LIMITED
• "Search Analytics load quota exceeded" → RATE_LIMITED (added in 2.1.0)
• "User does not have sufficient permission" → IGNORE
A generic HTTP 401 is not explicitly handled at all in the current manifest.
What I cannot confirm The knowledge sources do not contain the details of PR #29741 (the 1.2.2 fix), so I cannot say exactly what that original handling did, nor which specific subsequent PR dropped it during the manifest migration. That context would require reviewing the git history directly.
This does however reinforce why adding the REFRESH_TOKEN_THEN_RETRY filter for HTTP 401 as suggested previously is a valid restoration of behavior that was once explicitly supported. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.