Skip to content

fix: propagate Socket Mode retry_attempt and retry_reason to BoltRequest headers#1498

Open
SAY-5 wants to merge 1 commit into
slackapi:mainfrom
SAY-5:fix-socket-mode-retry-headers
Open

fix: propagate Socket Mode retry_attempt and retry_reason to BoltRequest headers#1498
SAY-5 wants to merge 1 commit into
slackapi:mainfrom
SAY-5:fix-socket-mode-retry-headers

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 12, 2026

Summary

In Socket Mode, SocketModeRequest.retry_attempt and SocketModeRequest.retry_reason were dropped when building the Bolt request, so middleware and listeners could not detect Events API retries the way they can in HTTP mode. This synthesizes the x-slack-retry-num / x-slack-retry-reason headers from the envelope so existing retry detection logic works unchanged under Socket Mode. Closes #1484.

Testing

Run python -m pytest tests/adapter_tests/socket_mode/test_internals.py tests/scenario_tests/test_events_socket_mode.py.

Category

  • slack_bolt.App and/or its core components
  • slack_bolt.async_app.AsyncApp and/or its core components
  • Adapters in slack_bolt.adapter
  • Document pages under /docs
  • Others

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run ./scripts/install_all_and_run_tests.sh after making the changes.

Note: I have not yet signed the Salesforce CLA; happy to do so if this is something you would like to accept.

@SAY-5 SAY-5 requested a review from a team as a code owner May 12, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Socket Mode: retry_attempt and retry_reason are dropped when building AsyncBoltRequest

1 participant