slapr
slapr copied to clipboard
The server responded with: ***'ok': False, 'error': 'already_reacted'***
Environment details (Operating System, Cloud provider, etc):
https://github.com/DataDog/integrations-core/actions/runs/7184356048/job/19565229824?pr=16394
Describe what happened:
When I comment on an already commented PR, I get this error when the bot is triggered:
Traceback (most recent call last):
Event PR: https://github.com/DataDog/integrations-core/pull/16394
File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.7/site-packages/slapr/__main__.py", line 36, in <module>
main(config)
File "/usr/local/lib/python3.7/site-packages/slapr/main.py", line 74, in main
channel_id=config.slack_channel_id,
File "/usr/local/lib/python3.7/site-packages/slapr/slack.py", line 98, in add_reaction
self._backend.add_reaction(timestamp=timestamp, emoji=emoji, channel_id=channel_id)
File "/usr/local/lib/python3.7/site-packages/slapr/slack.py", line 62, in add_reaction
self._client.reactions_add(channel=channel_id, name=emoji, timestamp=timestamp)
File "/usr/local/lib/python3.7/site-packages/slack/web/client.py", line 1347, in reactions_add
return self.api_call("reactions.add", json=kwargs)
File "/usr/local/lib/python3.7/site-packages/slack/web/base_client.py", line [17](https://github.com/DataDog/integrations-core/actions/runs/7184356048/job/19565229824?pr=16394#step:3:18)1, in api_call
return self._event_loop.run_until_complete(future)
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
return future.result()
File "/usr/local/lib/python3.7/site-packages/slack/web/base_client.py", line [22](https://github.com/DataDog/integrations-core/actions/runs/7184356048/job/19565229824?pr=16394#step:3:23)6, in _send
return SlackResponse(*******data, **res***).validate()
File "/usr/local/lib/python3.7/site-packages/slack/web/slack_response.py", line 176, 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': 'already_reacted'***
Slack message timestamp: 170[23](https://github.com/DataDog/integrations-core/actions/runs/7184356048/job/19565229824?pr=16394#step:3:24)67606.[39](https://github.com/DataDog/integrations-core/actions/runs/7184356048/job/19565229824?pr=16394#step:3:40)8589
Existing emojis: speech_balloon, review_started
Is merged: False
Mergeable state: blocked
Emojis to add (ordered) : comment
Emojis to remove : speech_balloon
Describe what you expected:
No failures
Steps to reproduce the issue:
- Open a PR
- Comment on it and wait for the emoji to be added to your message
- Comment again
Additional notes-
It's a new issue, We did not have this problem before this PR I think