Skip to content

Fix: ack all block_actions to prevent 404 on button clicks - #4

Open
cresclaber wants to merge 1 commit into
mainfrom
fix/ack-block-actions
Open

Fix: ack all block_actions to prevent 404 on button clicks#4
cresclaber wants to merge 1 commit into
mainfrom
fix/ack-block-actions

Conversation

@cresclaber

Copy link
Copy Markdown

Summary

  • Adds a catch-all @app.action(re.compile(r".*")) handler in SlackAdapter._register_handlers that simply calls ack()
  • Fixes the WARNING slack_bolt.AsyncApp: Unhandled request {'type': 'block_actions', ...} log + 404 response seen in production

Root cause

When Matt sends a Block Kit message with buttons (e.g. action_id: "open_doc" URL buttons), clicking them sends a block_actions event to the Slack app. Without a handler, slack-bolt logs a WARNING and returns 404 — Slack may retry the event and the user sees the button "fail" even though the URL opens correctly.

Test plan

  • All 50 existing tests pass (uv run pytest tests/ -v)
  • After deploy: no more Unhandled request WARNING logs for block_actions events in GCP Cloud Logging

🤖 Generated with Claude Code

Slack sends a block_actions event whenever a user clicks any Block Kit
button (including URL buttons where the open happens client-side). Without
a handler, slack-bolt returns 404 and logs a WARNING for each click.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@cresclaber
cresclaber requested a review from htkuan June 24, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant