My guess is this happens when an edited message re-triggers a filter. If this is indeed the case, then the error can simply be ignored.
ResponseCodeError: Status: 400 Response: {'id': ['offensive message with this id already exists.']}
(1 additional frame(s) were not displayed)
...
File "bot/cogs/filtering.py", line 143, in on_message_edit
await self._filter_message(after, delta)
File "bot/cogs/filtering.py", line 304, in _filter_message
await self.bot.api_client.post('bot/offensive-messages', json=data)
File "bot/api.py", line 127, in post
return await self.request("POST", endpoint, raise_for_status=raise_for_status, **kwargs)
File "bot/api.py", line 114, in request
await self.maybe_raise_for_status(resp, raise_for_status)
File "bot/api.py", line 104, in maybe_raise_for_status
raise ResponseCodeError(response=response, response_json=response_json)
Unhandled exception in on_message_edit.
Sentry Issue: BOT-6B
My guess is this happens when an edited message re-triggers a filter. If this is indeed the case, then the error can simply be ignored.