Skip to content

Conversation

@mtingers
Copy link

The SlackClient method rtm_connect does not provide a reason for
failed connections and only returns True or False. This change
makes it so:
- Exceptions can be raised in the client's rtm_connect method
- A connection can be established on instantiation

For example, this exception can now be raised so the problem is not
masked:
urllib2.HTTPError: HTTP Error 429: Too Many Requests

The slack client can now be instantiated in this manner:
sc = SlackClient(SLACK_TOKEN, connect=True)

Exceptions can also be raised by invoking rtm_connect as such:
sc.rtm_connect(debug=True)

The SlackClient method rtm_connect does not provide a reason for
failed connections and only returns True or False. This change
makes it so:
    - Exceptions can be raised in the client's rtm_connect method
    - A connection can be established on instantiation

For example, this exception can now be raised so the problem is not
masked:
    urllib2.HTTPError: HTTP Error 429: Too Many Requests

The slack client can now be instantiated in this manner:
    sc = SlackClient(SLACK_TOKEN, connect=True)

Exceptions can also be raised by invoking rtm_connect as such:
    sc.rtm_connect(debug=True)
@pkinlen
Copy link

pkinlen commented Aug 30, 2016

It really would be helpful to have the debug argument:
sc.rtm_connect(debug=True)

@palfrey
Copy link

palfrey commented Sep 14, 2016

Any chance of moving this forward?

@Mixser
Copy link

Mixser commented Nov 29, 2016

Please, change name of "debug" argument, because it's make confuse, that i mustn't use this flag in production. 'raise_exception' better than 'debug'

mrbox added a commit to mrbox/python-slackclient that referenced this pull request Mar 14, 2017
It's copy&paste from slackapi#50 but including the change requested in PR
@KellyR-STCU
Copy link

Please lets move this forward. I currently cannot connect and I have no idea why because it just returns False.

@Roach
Copy link
Contributor

Roach commented Jan 23, 2018

Closing this in favor of refactoring a bunch of error propagation logic in here

@Roach Roach closed this Jan 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants