Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make pyslack more resilient to slack failures #29

Open
rbalik opened this issue Dec 22, 2016 · 2 comments
Open

Make pyslack more resilient to slack failures #29

rbalik opened this issue Dec 22, 2016 · 2 comments

Comments

@rbalik
Copy link

rbalik commented Dec 22, 2016

Slack is having an outage today where among other things they aren't properly responding to webhooks. This is causing pyslack to throw an exception in the JSON parser and bring down our whole application.

Is there a way to make the library catch these types of issues internally and fail silently if requested? The alternative is to wrap every logging call in a try/except block

@loisaidasam
Copy link
Owner

Hi @rbalik, and thanks for the heads up.

I do indeed see the Slack is experiencing degraded service this morning: https://status.slack.com/2016-12/92ca538bc556e84f

If I were to make a change, I think a reasonable solution to this problem would be calling response.raise_for_status(), raising a custom exception, and adding some sort of parameter to client calls like handle_errors_gracefully for handling that.

It's been a bit over a year since any active development of this library. It seems that Slack themselves have gone on and made their own client, which should be up to snuff with their latest API and whatnot.

For a quick fix, I'd suggest just wrapping your slack calls with try/except blocks. Sorry for the troubles, and happy holidays!

@rbalik
Copy link
Author

rbalik commented Dec 22, 2016

Oh, I didn't realize they had their own client out. We'll have to check that out. Thanks a lot

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

No branches or pull requests

2 participants