Why This Matters
the Telegram path already redacts bot tokens and survives non-JSON failures; Slack and Discord should be equally safe.
Read First
app/utils/slack_delivery.py
app/utils/discord_delivery.py
app/utils/telegram_delivery.py
Scope
- Update Slack and Discord delivery code so
resp.json() is never assumed to succeed.
- Make sure returned error strings and logs do not include raw access tokens or bot tokens.
- Follow the Telegram module's redaction behavior as the baseline.
Tests / Coverage
- add tests for HTML/plain-text error bodies
- add tests for exceptions containing tokens in the message
- add tests that confirm the returned error strings are redacted
Acceptance Criteria
- Slack and Discord helpers survive non-JSON failure bodies
- tokens are redacted in logs and return values
- no existing success-path behavior regresses
Why This Matters
the Telegram path already redacts bot tokens and survives non-JSON failures; Slack and Discord should be equally safe.
Read First
app/utils/slack_delivery.pyapp/utils/discord_delivery.pyapp/utils/telegram_delivery.pyScope
resp.json()is never assumed to succeed.Tests / Coverage
Acceptance Criteria