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

Notification silently fails when slack has not enough permissions #11

Open
dmartin35 opened this issue Oct 19, 2020 · 0 comments
Open

Comments

@dmartin35
Copy link
Contributor

in verbose mode, (which is not visible otherwhise), CTK does not indicate any warning neither error indicating the notification has not been sent

[2020-10-19 10:01:14 DEBUG] [notification:229] Slack client call failed: The request to the Slack API failed.
    The server responded with: {'ok': False, 'error': 'missing_scope', 'needed': 'chat:write:bot', 'provided': 'identify,incoming-webhook'}
    Traceback (most recent call last):
      File "/Users/dmartin/Sources/chaostoolkit/chaostoolkit-slack/chaosslack/notification.py", line 225, in notify
        attachments=attachments
      File "/Users/dmartin/.pyenv/versions/3.7.4/envs/chaostk/lib/python3.7/site-packages/slack/web/client.py", line 1077, in chat_postMessage
        return self.api_call("chat.postMessage", json=kwargs)
      File "/Users/dmartin/.pyenv/versions/3.7.4/envs/chaostk/lib/python3.7/site-packages/slack/web/base_client.py", line 150, in api_call
        return self._sync_send(api_url=api_url, req_args=req_args)
      File "/Users/dmartin/.pyenv/versions/3.7.4/envs/chaostk/lib/python3.7/site-packages/slack/web/base_client.py", line 248, in _sync_send
        additional_headers=headers,
      File "/Users/dmartin/.pyenv/versions/3.7.4/envs/chaostk/lib/python3.7/site-packages/slack/web/base_client.py", line 377, in _urllib_api_call
        use_sync_aiohttp=False,
      File "/Users/dmartin/.pyenv/versions/3.7.4/envs/chaostk/lib/python3.7/site-packages/slack/web/slack_response.py", line 194, in validate
        raise e.SlackApiError(message=msg, response=self)
    slack.errors.SlackApiError: The request to the Slack API failed.
    The server responded with: {'ok': False, 'error': 'missing_scope', 'needed': 'chat:write:bot', 'provided': 'identify,incoming-webhook'}

Do we want to indicate any potential error to the user ?

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

1 participant