Skip to content

fix(#626): a Slack file download's 403 gets the files:read reinstall hint - #627

Merged
nolnoch merged 1 commit into
masterfrom
fix/626-download-403
Nov 9, 2026
Merged

nolnoch merged 1 commit into
masterfrom
fix/626-download-403

Conversation

@nolnoch

@nolnoch nolnoch commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Closes #626.

Problem

  • Slack now answers HTTP 403 when a bot token without files:read downloads a shared file; it used to serve a 200 sign-in page.
  • The bridge's reinstall hint only matched the old case, so the owner saw a bare ⚠️ not sent: slack file download: HTTP 403.

Solution

  • SlackWeb.download (src/bridge/web.ts) reports 401/403 as SlackError code forbidden.
  • Relay.fetchFiles (src/bridge/relay.ts) gives forbidden the same "does the app have files:read? reinstall it from the current manifest" hint as size_mismatch (kept for the old 200 behaviour). Covers both the local and org bridges, which share fetchFiles.
  • docs/slack-bridge.md §Files updated.

Tests

  • Fake Slack gains a forbidden hosted file served as 403; tests/integration/slack.test.ts "a Slack file that can't come along…" asserts the hint for it.
  • bun run typecheck clean; bun test tests/integration/slack.test.ts src/bridge/bridge.test.ts: 46 pass.

Parity: no docs/parity.md cell changes (error text only, same behaviour on both bridges).

🤖 Generated with Claude Code

…hint

Slack now answers 403 to a token without files:read, where it once
served a sign-in page with status 200. SlackWeb.download reports
401/403 as `forbidden`, and fetchFiles gives it the same reinstall
hint as `size_mismatch`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nolnoch nolnoch added the bridge Slack bridge label Nov 9, 2026
@nolnoch
nolnoch merged commit 9365043 into master Nov 9, 2026
11 checks passed
@nolnoch
nolnoch deleted the fix/626-download-403 branch November 9, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bridge Slack bridge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Slack file download 403 (no files:read) shows a bare HTTP error, not the reinstall hint

1 participant