Started using Slack API for Python, got comfortable using it from their documentation. I couldn't understand how this is working under the hood
Slack API returns SlackResponse
object in case of a failure (or success as well), and it will look something like this
Now if I run
e.response["error"]
it prints 'channel_not_found'
message - as a str
object
Thought "error"
is a key
(as in e.response
as a dict
), and tried to print all the available key
s, but it's not a dict
/hash
it seems
e.response.keys()
# AttributeError: 'SlackResponse' object has no attribute 'keys'
Can someone explain how this is possible please. Would love to understand how they made this possible. TIA