: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(slack): treat not_allowed_token_type as non-retryable (#119302)
Tom Owersfb9b9c27661c
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/slack/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/slack/source.pyindex c5ed682eb59d..21483778db8f 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/slack/source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/slack/source.py@@ -351,6 +351,7 @@ Prefer a manifest? Paste this when creating the app — it wires the request URL"account_inactive": "Your Slack account is inactive. Please reconnect the source.","token_revoked": "Your Slack token has been revoked. Please reconnect the source.","missing_scope": "Your Slack app is missing scopes PostHog needs. Add the bot scopes from the setup manifest, reinstall the app to your workspace, then try again.",+ "not_allowed_token_type": "This Slack token type isn't supported. Please paste the Bot User OAuth Token (starts with xoxb-) from your Slack app's Install App page.","not_in_channel": "The Slack bot is not a member of this channel. Please invite the bot to the channel and try again.","channel_not_found": "This Slack channel was not found. It may have been deleted or the bot lacks permission to access it.","Integration not found": "Your Slack integration was not found. Please reconnect the source.",diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/slack/tests/test_slack_source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/slack/tests/test_slack_source.pyindex 08410a3aa676..f3d2092b149f 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/slack/tests/test_slack_source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/slack/tests/test_slack_source.py@@ -58,6 +58,9 @@ class TestSlackSourceValidateCredentials:("missing_scope", "missing_scope", "Add the bot scopes from the setup manifest"),("invalid_auth", "invalid_auth", "token is invalid"),("token_revoked", "token_revoked", "revoked"),+ # Wrong token type (e.g. a user or app-level token pasted into the bot token field)+ # can never succeed on retry — the customer must paste the correct token.+ ("not_allowed_token_type", "not_allowed_token_type", "Bot User OAuth Token"),# An unmapped Slack error still surfaces the specific code rather than a generic string.("unknown_code", "some_new_error", "some_new_error"),]