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(slack): point a missing-scope error at the app manifest (#115949)

Tom Owers6211edfaade4
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.py
index 06d40e5b0714..61333da4ce35 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
@@ -278,7 +278,7 @@ Prefer a manifest? Paste this when creating the app — it wires the request URL
"invalid_auth": "Your Slack token is invalid. Please reconnect the source.",
"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 integration is missing required scopes. 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_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.py
index eb86253cb3dc..08410a3aa676 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
@@ -54,8 +54,8 @@ class TestSlackSourceValidateCredentials:
@parameterized.expand(
[
- # A valid token that only lacks scopes must guide a re-auth, not read as "invalid".
- ("missing_scope", "missing_scope", "missing required scopes"),
+ # A valid token that only lacks scopes must point at the app's scopes, not read as "invalid".
+ ("missing_scope", "missing_scope", "Add the bot scopes from the setup manifest"),
("invalid_auth", "invalid_auth", "token is invalid"),
("token_revoked", "token_revoked", "revoked"),
# An unmapped Slack error still surfaces the specific code rather than a generic string.