scrapinghub / slackbot

A chat bot for Slack (https://slack.com).
MIT License
1.26k stars 394 forks source link

Make Slackbot Fail Silently #105

Closed andela-anandaa closed 7 years ago

andela-anandaa commented 8 years ago

Is there a way to make a Slackbot fail silently without showing the end-user the stack-trace, e.g.

screen shot 2016-08-13 at 1 50 01 pm
jsargiot commented 8 years ago

I might be wrong, but the only way to avoid showing tracebacks to users is to set ERRORS_TO to send tracebacks to another channel/user/group.

Or you could wrap all your commands in a try, except and respond that command failed.

rob-gonz commented 7 years ago

@jsargiot is correct. To be more specific, though, it is only the stack trace that will not be displayed in the slackbot response when using ERRORS_TO in the slackbot_settings.py.

But,

[temp] I had a problem handling "what is the temperature at Valhalla"

will still be displayed in response to the message "what is the temperature in Valhalla". The stack trace will be then sent to the channel or user set in ERRORS_TO.

andela-anandaa commented 7 years ago

@jsargiot @THEANONYMOU5 - Thanks, makes sense!