Closed nzlosh closed 2 years ago
Hi @nzlosh, thanks for writing in!
Is there any official documentation for this magic id and are there others that would need to be taken into account. I'm unable to find any official documentation regarding the bot id B01, with exception to the hubot slack SDK containing a mapping.
We're sorry about the confusion here and your understanding of the magic numbers here are correct. Also, unfortunately, there is no detailed guide about these special IDs (Bot ID: B01, user ID: USLACKBOT).
Why does the hubot code appear to have special handling of this id (and others) but the Python SDK does not? Are projects dependant on Python Slack SDK expected to implement their own error handling around this?
Ideally, all the official SDKs should have some feature similar to hubot-slack but we are not planning to add such at least in the short term. So, as a workaround, please go ahead with the same approach with hubot-slack, meaning skipping bots.info API calls with B01.
I hope this was helpful to you and we'd be grateful if you could understand this.
Thank you for taking the time to confirm that, I'll apply a workaround as suggested.
The errbot project uses the Python Slack SDK, users are reporting exceptions being raised when username resolution is applied to some bot messages.
Based on discussions here https://github.com/errbotio/err-backend-slackv3/pull/74#discussion_r961781175,
B01
is being passed as a bot id, but will return not found when querying the slack API.Is there any official documentation for this magic id and are there others that would need to be taken into account. I'm unable to find any official documentation regarding the bot id
B01
, with exception to the hubot slack SDK containing a mapping.https://github.com/slackapi/hubot-slack/blob/c0c0d8d348b1522afa9835ef84a46f2bfbc6cdaf/src/client.coffee#L53
Why does the hubot code appear to have special handling of this id (and others) but the Python SDK does not? Are projects dependant on Python Slack SDK expected to implement their own error handling around this?
Reproducible in:
The Slack SDK version
Python runtime version
OS info
Steps to reproduce:
(Share the commands to run, source code, and project settings (e.g., setup.py))
1. 2. 3.
Expected result:
Expect all bot id's sent from Slack's API to be resolvable via
bot_info
method.Actual result:
API responds with bot found error when search bot id
B01
.