You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our workspace is a big one (typical of any medium to large corporate). The initial call to form channel_list is throwing a rateLimited SlackError. I looked through the code for rate_limit_errors handling, dont see any. Is there an option for this, or a fix for this is in the works?
I am running slack-machine==0.32.0
$ slack-machine
2024-02-07 15:12:04 [info ] Initializing Slack Machine...
2024-02-07 15:12:04 [info ] Loading settings...
2024-02-07 15:12:04 [info ] Custom init done.
2024-02-07 15:12:04 [info ] Settings loaded!
Traceback (most recent call last):
File "/src/venv/bin/slack-machine", line 8, in <module>
sys.exit(main())
^^^^^^
File "/src/venv/lib/python3.11/site-packages/machine/bin/run.py", line 19, in main
loop.run_until_complete(bot.run())
File "/src/.pyenv/versions/3.11.5/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/src/venv/lib/python3.11/site-packages/machine/core.py", line 264, in run
await self._setup()
File "/src/venv/lib/python3.11/site-packages/machine/core.py", line 77, in _setup
await self._setup_slack_clients()
File "/src/venv/lib/python3.11/site-packages/machine/core.py", line 118, in _setup_slack_clients
await self._client.setup()
File "/src/venv/lib/python3.11/site-packages/machine/clients/slack.py", line 119, in setup
async for page in await self._client.web_client.conversations_list(
File "/src/venv/lib/python3.11/site-packages/slack_sdk/web/async_slack_response.py", line 161, in __anext__
return self.validate()
^^^^^^^^^^^^^^^
File "/src/venv/lib/python3.11/site-packages/slack_sdk/web/async_slack_response.py", line 203, in validate
raise e.SlackApiError(message=msg, response=self)
slack_sdk.errors.SlackApiError: The request to the Slack API failed. (url: https://www.slack.com/api/conversations.list, status: 429)
The server responded with: {'ok': False, 'error': 'ratelimited'}
The text was updated successfully, but these errors were encountered:
Hey @kannanmr thanks for the report. I have never encountered this due to using Slack Machine only on smaller workspaces (~150 members). It's good that you brought this to light!
Because I have never encountered this myself (nor have others ever reported this), I'm not working on a fix yet. I can try to figure out a fix, but it will be hard for me to implement a fix, let alone test it, as I do not have access to a workspace where this would happen.
Are you open to try and implement a fix? From what I can see in the documentation, Slack Machine would need to catch the ratelimit (HTTP 429) error and then read the Retry-After header to see how many seconds it has to wait before making a new request.
Our workspace is a big one (typical of any medium to large corporate). The initial call to form channel_list is throwing a rateLimited SlackError. I looked through the code for rate_limit_errors handling, dont see any. Is there an option for this, or a fix for this is in the works?
I am running
slack-machine==0.32.0
The text was updated successfully, but these errors were encountered: