-
Notifications
You must be signed in to change notification settings - Fork 273
Description
My message event handler was configured with a few matchers message_processors
.
app.message(jane_message, message_processors)(handle_command)
When one of the matcher return False
, the event would be considered unhandled.
INFO:slack_bolt.AsyncApp:Unsuccessful Bolt execution result (status: 404, body: {"error": "unhandled request"})
As a result, the message would be delivered a few more times with retry_reason
as timeout
.
DEBUG:slack_bolt.AsyncApp:Received message (type: TEXT, data: {"envelope_id":"5e7b873f-8260-499a-94ce-64c877e95df8","payload": ***, "type":"events_api","accepts_response_payload":false,"retry_attempt":3,"retry_reason":"timeout"}, extra: , session: s_8744028994636)
In my case, this resulted error messages being emitted multiple times by one of the matchers.
My desired behavior is one error message for one rejected message, what's the correct way to achieve that?
Reproducible in:
The slack_bolt
version
slack_bolt==1.20.0
Python runtime version
Python 3.10.12
OS info
#80-Ubuntu SMP Mon May 15 15:18:26 UTC 2023
Steps to reproduce:
(Share the commands to run, source code, and project settings (e.g., setup.py))
- Setup a message handler with one matcher that emits a message
say("foo")
and returns False - Trigger the handler by sending a message in the appropriate channel
- The bot would send multiple
foo
messages to the channel.
Expected result:
One error message for one rejected message (Matcher returned false)
Actual result:
Error messages being sent repetitively for one rejected message due to retry logic.
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.