thermondo/stanley

The bot is throwing an error "The request to the Slack API failed"

anapaulagomes opened this issue · 1 comments

04 Sep 2019 16:00:23.747128 <190>1 2019-09-04T14:00:22.768018+00:00 app web.1 - - Traceback (most recent call last):
  File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/app/.heroku/python/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/app/stanley/routes.py", line 43, in forward_feedback
    send_slack_message('{}'.format(receiver), message=message)
  File "/app/stanley/slack.py", line 19, in send_slack_message
    as_user=True,
  File "/app/.heroku/python/lib/python3.6/site-packages/slack/web/client.py", line 332, in chat_postMessage
    return self.api_call("chat.postMessage", json=kwargs)
  File "/app/.heroku/python/lib/python3.6/site-packages/slack/web/base_client.py", line 154, in api_call
    return self._event_loop.run_until_complete(future)
  File "/app/.heroku/python/lib/python3.6/asyncio/base_events.py", line 467, in run_until_complete
    return future.result()
  File "/app/.heroku/python/lib/python3.6/site-packages/slack/web/base_client.py", line 223, in _send
    return SlackResponse(**{**data, **res}).validate()
  File "/app/.heroku/python/lib/python3.6/site-packages/slack/web/slack_response.py", line 174, in validate
    raise e.SlackApiError(message=msg, response=self.data)
slack.errors.SlackApiError: The request to the Slack API failed.
04 Sep 2019 16:00:24.2161024 <190>1 2019-09-04T14:00:23.339671+00:00 app web.1 - - ERROR:sentry.errors.uncaught:["SlackApiError: The request to the Slack API failed.\nThe server responded with: {'ok': False, 'error': 'channel_not_found'}", ' File "flask/app.py", line 2446, in wsgi_app', ' File "flask/app.py", line 1951, in full_dispatch_request', ' File "flask/app.py", line 1820, in handle_user_exception', ' File "flask/_compat.py", line 39, in reraise', ' File "flask/app.py", line 1949, in full_dispatch_request', ' File "flask/app.py", line 1935, in dispatch_request', ' File "stanley/routes.py", line 43, in forward_feedback', ' File "stanley/slack.py", line 19, in send_slack_message', ' File "slack/web/client.py", line 332, in chat_postMessage', ' File "slack/web/base_client.py", line 154, in api_call', ' File "asyncio/base_events.py", line 467, in run_until_complete', ' File "slack/web/base_client.py", line 223, in _send', ' File "slack/web/slack_response.py", line 174, in validate']

If you got this error, check if someone in your team changed his/her last name (or anything that composes its handler). :)