getsentry / getsentry/sentry

Slack integration doesn't work with the new rotating tokens

Open
#31,603 8 comments 2 reactions 0 assignees View on GitHub
Product Area: Settings - Integrations
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
1d 5h
Merged PRs (30d)
624

Description

### Version

21.12.0

### Steps to Reproduce

* Create a new slack app (with rotating tokens) for Sentry
* Setup it on Sentry

### Expected Result

It should handle the changed token

### Actual Result

It didn't handle it:

08:12:30 [INFO] sentry.integrations.client: integration.http_response (integration='slack' status_string='200') 08:12:30 [INFO] sentry.integrations.slack: rule.slack.conversation_info_failed (error='token_expired')
Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/sentry/integrations/slack/utils/channel.py", line 85, in validate_channel_id results = client.get("/conversations.info", headers=headers, params=payload)
File "/usr/local/lib/python3.8/site-packages/sentry/shared_integrations/client.py", line 305, in get return self.request("GET", *args, **kwargs) File "/usr/local/lib/python3.8/site-packages/sentry/integrations/slack/client.py", line 83, in request
raise ApiError(response.get("error", "")) sentry.shared_integrations.exceptions.ApiError: token_expired

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.